Closed hacdias closed 3 years ago
@kevincox: could you confirm if this fixes it for you?
I can confirm that this now fails gracefully:
% nix-shell --pure -p git -p nodejs --run 'npx github:ipfs-shipyard/ipfs-deploy#53cc77d00af75e4aa40633b9f63effd9e0ae7739 d'
đź“‚ Deploying d directory.
📦 Calculating size of d…
đźšš Directory d weighs 447.8 KiB.
⚙️ Validating pinners configurations…
⚙️ Validating DNS providers configurations…
📠Uploading and pinning to Infura…
đź“Ś Added and pinned to Infura with CID:
🔗 QmNX4bXbY6UCnaNLS3YSjhXWJ8cg94ozhVz28aLiiZjYrs (​https://ipfs.infura.io/ipfs/QmNX4bXbY6UCnaNLS3YSjhXWJ8cg94ozhVz28aLiiZjYrs​)
📋 Copying HTTP gateway URL to clipboard…
⚠️ Could not copy URL to clipboard.
Error: Couldn't find the `xsel` binary and fallback didn't work. On Debian/Ubuntu you can install xsel with: sudo apt install xsel
at makeError (/home/kevincox/.npm/_npx/4033/lib/node_modules/ipfs-deploy/node_modules/clipboardy/lib/linux.js:14:11)
at xselWithFallbackSync (/home/kevincox/.npm/_npx/4033/lib/node_modules/ipfs-deploy/node_modules/clipboardy/lib/linux.js:43:10)
at Object.copySync (/home/kevincox/.npm/_npx/4033/lib/node_modules/ipfs-deploy/node_modules/clipboardy/lib/linux.js:53:3)
at Object.exports.writeSync (/home/kevincox/.npm/_npx/4033/lib/node_modules/ipfs-deploy/node_modules/clipboardy/index.js:45:14)
at copyToClipboard (/home/kevincox/.npm/_npx/4033/lib/node_modules/ipfs-deploy/src/deploy.js:107:16)
at deploy (/home/kevincox/.npm/_npx/4033/lib/node_modules/ipfs-deploy/src/deploy.js:268:5)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async main (/home/kevincox/.npm/_npx/4033/lib/node_modules/ipfs-deploy/src/cli.js:174:17)
QmNX4bXbY6UCnaNLS3YSjhXWJ8cg94ozhVz28aLiiZjYrs
time Total: 21.922 (56%), User: 10.866, System: 1.467 - nix-shell --pure -p git -p nodejs --run
% echo $?
0
If the error from #211 is during runtime and not installation, then this should fix it as long as the flag
-C
is used. I'm not changing the default behavior now (see #212).This also ensures that using the clipboard and "open" feature do not make the entire process blow up, but just give a warning. Those are non-fundamental functionalities and they're purely there for simplifying the user's life.
I will work on better docs separately.
License: MIT Signed-off-by: Henrique Dias hacdias@gmail.com