diff --git a/common/changes/@microsoft/rush/bmiddha-azureauthhelpertrim_2025-10-01-20-20.json b/common/changes/@microsoft/rush/bmiddha-azureauthhelpertrim_2025-10-01-20-20.json new file mode 100644 index 00000000000..15b40b3b3f2 --- /dev/null +++ b/common/changes/@microsoft/rush/bmiddha-azureauthhelpertrim_2025-10-01-20-20.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "[rush-azure-storage-build-cache-plugin] Trim access token output in AdoCodespacesAuthCredential", + "type": "patch" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/rush-plugins/rush-azure-storage-build-cache-plugin/src/AdoCodespacesAuthCredential.ts b/rush-plugins/rush-azure-storage-build-cache-plugin/src/AdoCodespacesAuthCredential.ts index 8ca8b4c0bee..86b2acfca26 100644 --- a/rush-plugins/rush-azure-storage-build-cache-plugin/src/AdoCodespacesAuthCredential.ts +++ b/rush-plugins/rush-azure-storage-build-cache-plugin/src/AdoCodespacesAuthCredential.ts @@ -54,7 +54,10 @@ export class AdoCodespacesAuthCredential implements TokenCredential { } const azureAuthHelperExec: string = 'azure-auth-helper'; - const token: string = Executable.spawnSync(azureAuthHelperExec, ['get-access-token', scope]).stdout; + const token: string = Executable.spawnSync(azureAuthHelperExec, [ + 'get-access-token', + scope + ]).stdout.trim(); let expiresOnTimestamp: number;