File tree 5 files changed +6
-12
lines changed
5 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,7 @@ function Initialize-VSEnvironment {
45
45
)
46
46
47
47
if (! (Test-Path $path )) {
48
- Write-Error (' {0} path not found.' -f $path );
49
- return ;
48
+ Write-Error (' {0} path not found.' -f $path ) - ErrorAction Stop;
50
49
}
51
50
52
51
$toolsetVersion = ' ' ;
Original file line number Diff line number Diff line change @@ -30,8 +30,7 @@ function Install-FromPacman {
30
30
)
31
31
$bash = Get-Command ' bash' - ErrorAction ' SilentlyContinue' ;
32
32
if ($null -eq $bash ) {
33
- Write-Error (' Could not find bash to use to install {0}' -f $name );
34
- return
33
+ Write-Error (' Could not find bash to use to install {0}' -f $name ) - ErrorAction Stop;
35
34
}
36
35
37
36
# Temp file for output
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ function Register-SystemPath {
26
26
)
27
27
28
28
if (! ([System.IO.Path ]::IsPathRooted($path ))) {
29
- Write-Error ' All system path values need to be absolute' ;
30
- return ;
29
+ Write-Error ' All system path values need to be absolute' - ErrorAction Stop;
31
30
}
32
31
33
32
Write-Information - MessageData (' Adding {0} to the system path' -f $path ) - InformationAction Continue ;
Original file line number Diff line number Diff line change @@ -45,8 +45,7 @@ function Select-VSEnvironment {
45
45
$version = ' vs2015' ;
46
46
}
47
47
else {
48
- Write-Error ' Could not find a compatible Visual Studio instance' ;
49
- return ;
48
+ Write-Error ' Could not find a compatible Visual Studio instance' - ErrorAction Stop;
50
49
}
51
50
}
52
51
@@ -69,8 +68,7 @@ function Select-VSEnvironment {
69
68
Write-Information - MessageData $vcvars - InformationAction Continue ;
70
69
71
70
if (! (Test-Path $vcvars )) {
72
- Write-Error (' Could not find {0}' -f $vcvars );
73
- return ;
71
+ Write-Error (' Could not find {0}' -f $vcvars ) - ErrorAction Stop;
74
72
}
75
73
76
74
Initialize-VSEnvironment - architecture $architecture - Path $vcvars ;
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ function Update-XamppPerlLocation {
27
27
$perlExecutable = Join-Path $perlPath (Join-Path ' perl' (Join-Path ' bin' ' perl.exe' ));
28
28
29
29
if (! (Test-Path $perlExecutable )) {
30
- Write-Error (' perl not found at {0}' -f $perlPath );
31
- return ;
30
+ Write-Error (' perl not found at {0}' -f $perlPath ) - ErrorAction Stop;
32
31
}
33
32
34
33
$registryValue = (' {0} -T' -f $perlExecutable );
You can’t perform that action at this time.
0 commit comments