You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I came cross an issue when moving to Speculate from an old build process.
Basically, we have a NodeJS project which makes use of file: dependencies.
After an npm install, those dependencies are present in node_modules as symlinks:
# ls -ld node_modules/bbcid-vertex-logger
lrwxrwxrwx 1 jenkins jenkins 48 Jun 19 15:47 node_modules/bbcid-vertex-logger -> ../../apigee-vertex/packages/bbcid-vertex-logger
However, the contents of files under that symlink never make it into the SOURCES/*.tar.gz file. Instead, only the symlink itself is copied into the archive:
# tar -tf SOURCES/bbcidv5-openam-apigee.tar.gz | grep bbcid-vertex-logger
node_modules/bbcid-vertex-logger
Potential Solution?
I suspect that the archiving function of speculate is deciding not to follow the symlinks. I believe that instead, any links should be followed and the files pointed to should be archived (similar to the -h (--dereference) flag of the TAR utility.
Would this be possible by setting options.dereference to true in archiver.js? (docs). This could even be placed behind a flag like --follow-symlinks if it isn't the desired ordinary behaviour.
Workaround
Use rsync to copy out all the links first of all. I used this in my Makefile:
Summary
Hello, I came cross an issue when moving to Speculate from an old build process.
Basically, we have a NodeJS project which makes use of
file:
dependencies.After an
npm install
, those dependencies are present innode_modules
as symlinks:However, the contents of files under that symlink never make it into the
SOURCES/*.tar.gz
file. Instead, only the symlink itself is copied into the archive:Potential Solution?
I suspect that the archiving function of speculate is deciding not to follow the symlinks. I believe that instead, any links should be followed and the files pointed to should be archived (similar to the
-h (--dereference)
flag of the TAR utility.Would this be possible by setting
options.dereference
to true inarchiver.js
? (docs). This could even be placed behind a flag like--follow-symlinks
if it isn't the desired ordinary behaviour.Workaround
Use
rsync
to copy out all the links first of all. I used this in my Makefile:The text was updated successfully, but these errors were encountered: