2 Commits 8a7fb76133 ... ee1a33588b

Author SHA1 Message Date
  David Witham ee1a33588b Exclude vscode dir 3 years ago
  David Witham 686dfba74d Removed throw statements 3 years ago
1 changed files with 5 additions and 2 deletions
  1. 5 2
      backup_aragorn.psm1

+ 5 - 2
backup_aragorn.psm1

@@ -90,7 +90,8 @@ function check_disk($diskoverride=$false) {
     if ($last_updated.AddDays(20) -lt (Get-Date)) {
         if (!($diskoverride)) {
             Write-Host -ForegroundColor DarkRed "This disk was last used less than 3 weeks ago. Override with -diskoverride."
-            throw 'Unable to proceed'
+            #throw 'Unable to proceed'
+            Exit 1
         }
     }
 
@@ -98,7 +99,8 @@ function check_disk($diskoverride=$false) {
     # How much free space is there?
     if ($backupDisk.FreeSpace / 1gb -lt 20) {
         Write-Host -ForegroundColor DarkRed "There is less than 20gb free on the disk."
-        throw 'Unable to proceed'
+        #throw 'Unable to proceed'
+        Exit 1
     }
 
 
@@ -193,6 +195,7 @@ MicrosoftEdgeBackups
 Cookies
 .cache
 .vagrant.d
+.vscode
 "@
 
     # Build the exclude rules