0

I have the following coffeescript build file:

{
    "cmd": ["coffee", "-c", "$file"]
,   "selector": "source.coffee"
}

which when I try to run it gives me:

[Error 2] The system cannot find the file specified [cmd: [u'coffee',u'-c', u'W:\mayapp\myscript.coffee']]

[dir: W:\myapp]

[path: /usr/local/bin:C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\nodejs\;C:\Program Files\Mercurial\;C:\Program Files\TortoiseSVN\bin;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Program Files (x86)\Bitvise SSH Client;C:\Chocolatey\bin;C:\Users\George\AppData\Roaming\npm\;C:\Program Files\Gallio\bin;C:\Program Files (x86)\Git\cmd;] [Finished]

In powershell

coffee -c w:\myapp\myscript.coffee

runs just fine leading me to think it's the coffee file from npm that the build system cannot find. Yet notice the npm directory IS on my path and coffee.cmd is absolutely in that directory

W:> get-command coffee | select path

Path
----
C:\Users\George\AppData\Roaming\npm\coffee.cmd

my best guess is that the error is due to that linux path prefixed to sublime's path variable but I have no idea where that is coming from it is not in my path variable outside of sublime.

George Mauer
  • 117,483
  • 131
  • 382
  • 612

1 Answers1

1

The solution was to use the command name with extension - sublime was unable to infer it.

So:

{
    "cmd": ["coffee.cmd", "-c", "$file"]
,   "selector": "source.coffee"
}
George Mauer
  • 117,483
  • 131
  • 382
  • 612