Link relative rather than absolute?
Closed this issue · 3 comments
coolaj86 commented
I have a build and deploy process in which the build happens in a temp directory and then deploys to a different directory to be run.
When this happens there's an error because $
points to /tmp/random-name
rather than ../
.
coolaj86 commented
Looks like this should do the trick on Mac and Linux:
diff --git a/bin/basetag.js b/bin/basetag.js
index 252a1ab..f112b86 100755
--- a/bin/basetag.js
+++ b/bin/basetag.js
@@ -44,7 +44,7 @@ try {
throw new Error(`- File already exists: ${baseLink}`);
}
- fs.symlinkSync(base, baseLink, 'junction');
+ fs.symlinkSync('..', baseLink, 'junction');
log(`- Created $ symlink to ${base}\n`);
} catch (error) {
janniks commented
Very very good idea! Someone else had similar problems — I honestly did not now relative symlinks exist, I'll also test this out tomorrow...
janniks commented
Thanks for the idea and patch! 💡