Skip to content

Commit 95d03e5

Browse files
author
Maddie Clayton
authored
Merge pull request Azure#6421 from rasmusgude/patch-1
Fixing exception message in EnableAzureRMContextAutoSave to include invalid paths.
2 parents a99ffe9 + 67ed925 commit 95d03e5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/ResourceManager/Profile/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Updated error messages for Enable-AzureRmContextAutoSave
2122
* Create a context for each subscription when running `Connect-AzureRmAccount` with no previous context
2223

2324
## Version 5.2.0

src/ResourceManager/Profile/Commands.Profile/AutoSave/EnableAzureRmContextAutosave.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ void EnableAutosave(IAzureSession session, bool writeAutoSaveFile, out ContextAu
5959
string tokenPath = Path.Combine(session.TokenCacheDirectory, session.TokenCacheFile);
6060
if (!IsValidPath(contextPath))
6161
{
62-
throw new PSInvalidOperationException(string.Format("'{0}' is not a valid path. You cannot enable context autosave without a valid context path"));
62+
throw new PSInvalidOperationException(string.Format("'{0}' is not a valid path. You cannot enable context autosave without a valid context path", contextPath));
6363
}
6464

6565
if (!IsValidPath(tokenPath))
6666
{
67-
throw new PSInvalidOperationException(string.Format("'{0}' is not a valid path. You cannot enable context autosave without a valid token cache path"));
67+
throw new PSInvalidOperationException(string.Format("'{0}' is not a valid path. You cannot enable context autosave without a valid token cache path", tokenPath));
6868
}
6969

7070
result = new ContextAutosaveSettings
@@ -119,7 +119,7 @@ void EnableAutosave(IAzureSession session, bool writeAutoSaveFile, out ContextAu
119119
}
120120
catch
121121
{
122-
// do not throw if there are file system erroer
122+
// do not throw if there are file system error
123123
}
124124
}
125125

0 commit comments

Comments
 (0)