diff --git a/packages/cli/snap-tests/build-ntfs-junction/real/app/index.html b/packages/cli/snap-tests/build-ntfs-junction/real/app/index.html new file mode 100644 index 0000000000..87354c62d3 --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/real/app/index.html @@ -0,0 +1,8 @@ + + + + + + diff --git a/packages/cli/snap-tests/build-ntfs-junction/real/app/package.json b/packages/cli/snap-tests/build-ntfs-junction/real/app/package.json new file mode 100644 index 0000000000..7abb5d709c --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/real/app/package.json @@ -0,0 +1,4 @@ +{ + "name": "ntfs-junction-app", + "private": true +} diff --git a/packages/cli/snap-tests/build-ntfs-junction/setup.js b/packages/cli/snap-tests/build-ntfs-junction/setup.js new file mode 100644 index 0000000000..b18356254c --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/setup.js @@ -0,0 +1,9 @@ +const fs = require('node:fs'); +const path = require('node:path'); + +// Reproduce issue #1374: build fails when project root is reached through an NTFS junction. +// Layout after setup: +// ./real/app <- the actual project (real path) +// ./via <- NTFS junction pointing to ./real +// ./via/app <- the project reached through the junction +fs.symlinkSync(path.resolve('real'), path.resolve('via'), 'junction'); diff --git a/packages/cli/snap-tests/build-ntfs-junction/snap.txt b/packages/cli/snap-tests/build-ntfs-junction/snap.txt new file mode 100644 index 0000000000..f26da1a682 --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/snap.txt @@ -0,0 +1,2 @@ +> node setup.js +> cd via/app && vp build 2>&1 diff --git a/packages/cli/snap-tests/build-ntfs-junction/steps.json b/packages/cli/snap-tests/build-ntfs-junction/steps.json new file mode 100644 index 0000000000..b0084b34c5 --- /dev/null +++ b/packages/cli/snap-tests/build-ntfs-junction/steps.json @@ -0,0 +1,7 @@ +{ + "ignoredPlatforms": ["darwin", "linux"], + "commands": [ + { "command": "node setup.js", "ignoreOutput": true }, + "cd via/app && vp build 2>&1" + ] +}