Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command "gh tr" not working on win7 #8

Open
ramonPires opened this issue Sep 19, 2013 · 6 comments
Open

command "gh tr" not working on win7 #8

ramonPires opened this issue Sep 19, 2013 · 6 comments

Comments

@ramonPires
Copy link
Contributor

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
Copy link
Contributor

Awesome! Thanks for sending those fixes @ramonPires.

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

@zenorocha
Copy link
Contributor



:octocat: Sent from GH.

@ramonPires
Copy link
Contributor Author

@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
Copy link
Member

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

@henvic
Copy link
Member

henvic commented Oct 7, 2013

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

@henvic
Copy link
Member

henvic commented Oct 8, 2013

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants