mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-19 16:55:02 +02:00
fix: Handle spaces in repo path when building n8n for docker (no-changelog)
This commit is contained in:
parent
909012bc23
commit
60dc4560a7
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
import { $, echo, fs, chalk } from 'zx';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
// Check if running in a CI environment
|
||||
const isCI = process.env.CI === 'true';
|
||||
|
|
@ -22,7 +23,8 @@ const excludeTestController =
|
|||
$.verbose = !isCI;
|
||||
process.env.FORCE_COLOR = isCI ? '0' : '1';
|
||||
|
||||
const scriptDir = path.dirname(new URL(import.meta.url).pathname);
|
||||
// fileURLToPath (not URL.pathname) so paths with spaces stay valid
|
||||
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
||||
const isInScriptsDir = path.basename(scriptDir) === 'scripts';
|
||||
const rootDir = isInScriptsDir ? path.join(scriptDir, '..') : scriptDir;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user