-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: use wide string for findPackageJson onWindows
Fix error when searching for package.json with non-ASCII characters in paths Fixes: #55773
- Loading branch information
Showing
5 changed files
with
87 additions
and
58 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
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,20 @@ | ||
'use strict'; | ||
|
||
const fs = require('node:fs'); | ||
const common = require('../common'); | ||
const tmpdir = require('../common/tmpdir'); | ||
const { describe, it } = require('node:test'); | ||
const assert = require('node:assert'); | ||
|
||
describe('None ASCII', () => { | ||
it('should be able to run on a directory with non-ASCII characters', async () => { | ||
fs.mkdirSync(tmpdir.resolve('12ζ'), { recursive: true }); | ||
fs.writeFileSync( | ||
tmpdir.resolve('12ζ/index.js'), | ||
"console.log('12ζ');", | ||
); | ||
await common.spawnPromisified(process.execPath, [tmpdir.resolve('12ζ/index.js')]).then(common.mustCall((result) => { | ||
assert.strictEqual(result.stdout, '12ζ' + '\n'); | ||
})); | ||
}); | ||
}); |