-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: dont add quotes on node global bin path on Windows (#317)
need to wait for npm/cmd-shim#42 to be merged and publish a new version. closes #316
- Loading branch information
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "runscript-with-egg-doctools", | ||
"dependencies": { | ||
"egg-doctools": "2.9.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
const assert = require('assert'); | ||
const path = require('path'); | ||
const runScript = require('runscript'); | ||
const readJSON = require('../lib/utils').readJSON; | ||
const npminstall = require('./npminstall'); | ||
const helper = require('./helper'); | ||
|
||
describe('test/runscript-with-egg-doctools.test.js', () => { | ||
const root = helper.fixtures('runscript-with-egg-doctools'); | ||
const cleanup = helper.cleanup(root); | ||
|
||
beforeEach(cleanup); | ||
afterEach(cleanup); | ||
|
||
it('should runscript with egg-doctools bin', async () => { | ||
await npminstall({ | ||
root, | ||
}); | ||
const pkg = await readJSON(path.join(root, 'node_modules', 'egg-doctools', 'package.json')); | ||
assert(pkg.name === 'egg-doctools'); | ||
|
||
const bin = path.join(root, 'node_modules', '.bin', 'doctools'); | ||
const stdio = await runScript(`${bin} -V`, { stdio: 'pipe' }); | ||
assert(stdio.stdout.toString().trim() === '2.9.0'); | ||
}); | ||
}); |