-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
node: v21.7.3, bun: 1.1.16, pathe: ^1.1.2
Reproduction
import { delimiter } from 'pathe';
const buildPath = (projectPath = process.cwd(), env: Record<string, any>) => {
const PATH = Object.keys(env)
.filter((p) => /^path$/i.test(p) && env[p])
.map((p) => env[p].split(path.delimiter))
.reduce(
(set, p) => [
...set,
...p.filter((concatted: any) => !set.includes(concatted)),
],
[],
)
.join(path.delimiter);
const pathArr = [];
let p = projectPath;
let pp;
do {
pathArr.push(resolve(p, 'node_modules', '.bin'));
pp = p;
p = dirname(p);
} while (p !== pp);
pathArr.push(nodeGypPath, PATH);
const pathVal = pathArr.join(path.delimiter);
for (const key of Object.keys(env)) {
if (/^path$/i.test(key)) {
env[key] = pathVal;
}
}
return env;
};Describe the bug
The delimiter in the package is designed for macOS and Linux (using a colon ':'), but it doesn't work on Windows, which uses a semicolon ';'.
Additional context
No response
Logs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working