node-gh / gh-travis

NodeGH plugin for integrating Travis, a continous integration server
11 stars 5 forks source link

command "gh tr" not working on win7 #8

Open ramonPires opened 11 years ago

ramonPires commented 11 years ago

i'm running node-gh normally,but with gh-travis i got this issue:

PS D:\workspaces\Node.js\Node-GH\elixir> gh tr

C:\Users\RAMON\AppData\Roaming\npm\gh-tr.CMD:1
(function (exports, require, module, __filename, __dirname) { :: Created by np
                                                              ^
gh [error] Command not found
PS D:\workspaces\Node.js\Node-GH\elixir>

Opening this file gh-travis.cmd,the script is different from gh.cmd and others *.cmd files inside of C:\Users\RAMON\AppData\Roaming\npm folder.

gh-tr.cmd:

:: Created by npm, please don't edit manually.
"%~dp0\node_modules\gh-travis\bin\gh-travis.js"   %*

gh.cmd:

:: Created by npm, please don't edit manually.
@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\node_modules\gh\bin\gh.js" %*
) ELSE (
  node  "%~dp0\node_modules\gh\bin\gh.js" %*
)

mocha.cmd

:: Created by npm, please don't edit manually.
@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\node_modules\mocha\bin\mocha" %*
) ELSE (
  node  "%~dp0\node_modules\mocha\bin\mocha" %*
)

Searching, i found a possible solution: http://stackoverflow.com/questions/10396305/npm-package-bin-script-for-windows https://github.com/isaacs/npm/issues/2547

zenorocha commented 11 years ago

Awesome! Thanks for sending those fixes @ramonPires.

Could you test and let know me know if it works?

zenorocha commented 11 years ago



:octocat: Sent from GH.

ramonPires commented 11 years ago

@zenorocha ,still showing this error message:

D:\workspaces\Node.js\Node-GH\elixir [master]> gh tr
C:\Users\RAMON\AppData\Roaming\npm\gh-tr.CMD:1
(function (exports, require, module, __filename, __dirname) { :: Created by np
                                                              ^
gh [error] Command not found
D:\workspaces\Node.js\Node-GH\elixir [master]>

But now the gh-tr.cmd file was generated correctly:

:: Created by npm, please don't edit manually.
@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\node_modules\gh-travis\bin\gh-travis.js" %*
) ELSE (
  node  "%~dp0\node_modules\gh-travis\bin\gh-travis.js" %*
)

The version of Node.js in my environment is v0.10.2 and npm is 1.2.15 .

eduardolundgren commented 11 years ago

@henvic Did you had a chance to look at this issue? Thanks!

henvic commented 11 years ago

Oops, my bad. I haven't. But will look at night. Thank you for remembering me.

henvic commented 11 years ago

@ramonPires, sorry for the delay. Could you reproduce it on another machine and tell me if the same thing happens? I don't have access to a Windows computer. Do you have any idea about what is going on?

I asked a friend who develops also with node.js and has access to one to take a look tomorrow. Let's see if can help us :)