2013-02-20 131 views
0

我有以下CoffeeScript的构建文件:Sublime Text 2 - build在我的路径上找不到东西?

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

,当我尝试运行它给了我:

[错误2]系统找不到指定的文件[CMD:U”咖啡 'U'C',u'W:\ mayapp \ myscript.coffee']]

[DIR:W:\ MYAPP]

[路径:在/ 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 文件(x86) \ Bitvise SSH Client \ C:\ Chocolatey \ bin; C:\ Users \ George \ AppData \ Roaming \ npm \; C:\ Program Files \ Gallio \ bin; C:\ Program Files(x86)\ Git \ cmd ] [完成]

在PowerShell中

coffee -c w:\myapp\myscript.coffee 

运行就好导致我认为这是从故宫编译系统找不到coffee文件。然而,注意到故宫目录是我的道路上,并coffee.cmd绝对是在该目录中

W:> get-command coffee | select path 

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

我最好的猜测是错误是由于前缀,以崇高的路径变量,Linux的路径,但我不知道在哪里是来了从它不是在崇高的我的路径变量。

回答

1

解决方法是使用带扩展名的命令名 - sublime无法推断它。

所以:

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