diff --git a/build/actions/ssh.js b/build/actions/ssh.js index 506c8dbc..569e98db 100644 --- a/build/actions/ssh.js +++ b/build/actions/ssh.js @@ -23,8 +23,8 @@ limitations under the License. os = require('os'); if (os.platform() === 'win32') { return { - program: 'sh', - args: ['-c', command] + program: 'cmd.exe', + args: ['/s', '/c', command] }; } else { return { diff --git a/lib/actions/ssh.coffee b/lib/actions/ssh.coffee index a18d34d7..c04b7aa0 100644 --- a/lib/actions/ssh.coffee +++ b/lib/actions/ssh.coffee @@ -14,14 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. ### +# TODO: A function to reliably execute a command +# in all supported operating systems, including +# different Windows environments like `cmd.exe` +# and `Cygwin` should be encapsulated in a +# re-usable package. +# This is literally copy-pasted from the `resin-sync` +# module. getSubShellCommand = (command) -> os = require('os') - # Assume Cygwin if os.platform() is 'win32' return { - program: 'sh' - args: [ '-c', command ] + program: 'cmd.exe' + args: [ '/s', '/c', command ] } else return {