2013-02-20 112 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" 
}