fix(installer): resolve directory path to an absolute path
Ensures that the installation directory is always resolved to an absolute path. Previously, if a relative path like '.' was used, its interpretation could vary depending on the execution context of the script. This change uses `path.resolve` with `process.cwd()` as a fallback to guarantee a consistent and predictable absolute path for the installation directory.
This commit is contained in:
parent
4f9d5eeda0
commit
2c1cd8dca7
|
|
@ -71,7 +71,7 @@ program
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
installType,
|
installType,
|
||||||
directory: options.directory || '.',
|
directory: path.resolve(options.directory || process.cwd()),
|
||||||
ides: (options.ide || []).filter((ide) => ide !== 'other'),
|
ides: (options.ide || []).filter((ide) => ide !== 'other'),
|
||||||
expansionPacks: options.expansionPacks || [],
|
expansionPacks: options.expansionPacks || [],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue