Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
🐛 Fix OSX Tests After Windows Mega-Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
joefitzgerald committed Jul 11, 2014
1 parent 33b48b9 commit 85ceaf3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
12 changes: 10 additions & 2 deletions lib/executor.coffee
Expand Up @@ -18,6 +18,10 @@ class Executor
stdout = (data) -> output += data
stderr = (data) -> error += data
exit = (data) ->
console.log output
console.log error
console.log data
console.log error.replace(/\r?\n|\r/g, '') is "\'\"" + command + "\"\' is not recognized as an internal or external command,operable program or batch file."
if error? and error isnt '' and error.replace(/\r?\n|\r/g, '') is "\'\"" + command + "\"\' is not recognized as an internal or external command,operable program or batch file."
message =
line: false
Expand All @@ -31,6 +35,9 @@ class Executor
code = data
callback(code, output, error, messages)
args = [] unless args?
console.log command
console.log args
console.log options
bufferedprocess = new BufferedProcess({command, args, options, stdout, stderr, exit})
bufferedprocess.process.on 'error', (err) =>
if err.code is 'ENOENT'
Expand All @@ -41,6 +48,7 @@ class Executor
type: 'error'
source: 'executor'
messages.push message
else
console.log err
#else
console.log err

callback(127, output, error, messages)
7 changes: 5 additions & 2 deletions lib/goexecutable.coffee
Expand Up @@ -81,8 +81,11 @@ class GoExecutable
if item? and item isnt '' and item.trim() isnt ''
tuple = item.split('=')
key = tuple[0]
value = tuple[1]
# value = tuple[1].substring(1, tuple[1].length - 1) if tuple[1].length > 2
value = ''
if os.platform() is 'win32'
value = tuple[1]
else
value = tuple[1].substring(1, tuple[1].length - 1) if tuple[1].length > 2
if os.platform() is 'win32'
switch key
when 'set GOARCH' then go.arch = value
Expand Down
2 changes: 1 addition & 1 deletion spec/executor-spec.coffee
Expand Up @@ -24,7 +24,7 @@ describe "executor", ->
expect(stdout).toBeUndefined
expect(stderr).toBeUndefined
complete = true
result = executor.exec('dir', prefix, null, done, [pathhelper.home()])
result = executor.exec(command, prefix, null, done, [pathhelper.home()])

waitsFor =>
complete is true
Expand Down

0 comments on commit 85ceaf3

Please sign in to comment.