From dd765f701721dbc7f0720313750cf6eecd42ccca Mon Sep 17 00:00:00 2001 From: Tim Coutinho Date: Wed, 16 Dec 2020 16:55:54 -0800 Subject: [PATCH] Fix npm backup overwriting pip3 backup (#285) Co-authored-by: Tim Coutinho --- shallow_backup/backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shallow_backup/backup.py b/shallow_backup/backup.py index bf08e62c..5b0f8792 100644 --- a/shallow_backup/backup.py +++ b/shallow_backup/backup.py @@ -168,7 +168,7 @@ def run_cmd_if_no_dry_run(command, dest, dry_run) -> int: command = "npm ls --global --parseable=true --depth=0" temp_file_path = f"{backup_path}/npm_temp_list.txt" # If command is successful, go to the next parsing step. - npm_backup_cmd_success = run_cmd_if_no_dry_run(command, dest, dry_run) == 0 + npm_backup_cmd_success = run_cmd_if_no_dry_run(command, temp_file_path, dry_run) == 0 if npm_backup_cmd_success: npm_dest_file = f"{backup_path}/npm_list.txt" # Parse npm output