mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Fixed homepath in simulate script
This commit is contained in:
parent
5dd8bec393
commit
078f6b5dcd
1 changed files with 2 additions and 2 deletions
|
@ -1,12 +1,12 @@
|
||||||
spawn = require("child_process").spawn
|
spawn = require("child_process").spawn
|
||||||
|
|
||||||
[sessionOne, sessionTwo] = [process.argv[2],process.argv[3]]
|
[sessionOne, sessionTwo] = [process.argv[2],process.argv[3]]
|
||||||
|
homeDirectory = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE
|
||||||
unless sessionOne and sessionTwo and sessionOne.length is 24 and sessionTwo.length is 24
|
unless sessionOne and sessionTwo and sessionOne.length is 24 and sessionTwo.length is 24
|
||||||
console.log "Not enough games to continue!"
|
console.log "Not enough games to continue!"
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
run = (cb) ->
|
run = (cb) ->
|
||||||
command = spawn("coffee",["headless_client.coffee","one-game",sessionOne,sessionTwo],{cwd:"/Users/schmatz/codecombat/"})
|
command = spawn("coffee",["headless_client.coffee","one-game",sessionOne,sessionTwo],{cwd: homeDirectory + "/codecombat/"})
|
||||||
result = ""
|
result = ""
|
||||||
command.stdout.on 'data', (data) ->
|
command.stdout.on 'data', (data) ->
|
||||||
result += data.toString()
|
result += data.toString()
|
||||||
|
|
Loading…
Reference in a new issue