File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/ResourceManager/Profile/Commands.Profile/AzureRmAlias Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public static string GetProfilePath(string Scope, SessionState sessionState)
48
48
var powershellProfile = sessionState . PSVariable . GetValue ( "PROFILE" ) as PSObject ;
49
49
if ( powershellProfile == null || ! powershellProfile . Members . ToList ( ) . Any ( a => a . Name . Equals ( "CurrentUserAllHosts" ) ) )
50
50
{
51
- throw new NullReferenceException ( string . Format ( Properties . Resources . ProfilePathNull , "PROFILE.CurrentUserAllHosts" ) ) ;
51
+ throw new PSInvalidOperationException ( string . Format ( Properties . Resources . ProfilePathNull , "PROFILE.CurrentUserAllHosts" ) ) ;
52
52
}
53
53
userprofile = powershellProfile . Members . ToList ( ) . Where ( a => a . Name . Equals ( "CurrentUserAllHosts" ) ) . First ( ) . Value . ToString ( ) ;
54
54
}
@@ -58,7 +58,7 @@ public static string GetProfilePath(string Scope, SessionState sessionState)
58
58
var powershellProfile = sessionState . PSVariable . GetValue ( "PROFILE" ) as PSObject ;
59
59
if ( powershellProfile == null || ! powershellProfile . Members . ToList ( ) . Any ( a => a . Name . Equals ( "AllUsersAllHosts" ) ) )
60
60
{
61
- throw new NullReferenceException ( string . Format ( Properties . Resources . ProfilePathNull , "PROFILE.AllUsersAllHosts" ) ) ;
61
+ throw new PSInvalidOperationException ( string . Format ( Properties . Resources . ProfilePathNull , "PROFILE.AllUsersAllHosts" ) ) ;
62
62
}
63
63
userprofile = powershellProfile . Members . ToList ( ) . Where ( a => a . Name . Equals ( "AllUsersAllHosts" ) ) . First ( ) . Value . ToString ( ) ;
64
64
}
You can’t perform that action at this time.
0 commit comments