Automattic / vip-cli

The VIP-CLI
https://docs.wpvip.com/vip-cli/
MIT License
58 stars 17 forks source link

Add saveErrorLog flag to import media command #2007

Closed kevinfodness closed 2 months ago

kevinfodness commented 2 months ago

Description

Adds a --saveErrorLog flag to the import media command to allow the user to bypass the confirmation prompt for saving an error log if it is generated.

Fixes #2004

Pull request checklist

New release checklist

Steps to Test

Note: I was not able to get the vip command to run locally in my tests - it was erroring with Error: spawn vip.js-import ENOENT and I'm not sure how to get around this. Hopefully an Automattician can help to test this change or provide me with instructions on how to test locally.

  1. Check out PR.
  2. Run npm run build
  3. Run ./dist/bin/vip.js import media with the new --saveErrorLog flag set targeting an archive that contains a file that will error.
  4. Confirm that the error log is saved without user input.
aswasif007 commented 2 months ago

Hi @kevinfodness šŸ‘‹ Instead of adding --saveErrorLog flag, I think it is better to make sure that the --force flag bypass the prompt in question. I've raised a PR for that: https://github.com/Automattic/vip-cli/pull/2011

aswasif007 commented 2 months ago

Many thanks for working on this PR, @kevinfodness šŸ‘

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud