Skip to content

Commit 54cb280

Browse files
authored
Merge pull request #262 from salesforcecli/er/remove-call-to-preserve-accessToken
W-20199916: remove call to preserve accessToken
2 parents 0a5b63d + b2d2dc9 commit 54cb280

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/commands/agent/publish/authoring-bundle.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ export default class AgentPublishAuthoringBundle extends SfCommand<AgentPublishA
104104
const targetOrg = flags['target-org'];
105105
const conn = targetOrg.getConnection(flags['api-version']);
106106

107-
// Preserve the original accessToken by storing its value
108-
const originalAccessToken = conn.accessToken;
109-
110107
// First compile the .agent file to get the Agent JSON
111108
const compileResponse = await Agent.compileAgentScript(
112109
conn,
@@ -138,8 +135,6 @@ export default class AgentPublishAuthoringBundle extends SfCommand<AgentPublishA
138135
return Promise.resolve();
139136
});
140137

141-
// Restore the original accessToken after compilation
142-
conn.accessToken = originalAccessToken;
143138
const result = await Agent.publishAgentJson(conn, this.project!, compileResponse.compiledArtifact);
144139
mso.stop();
145140

0 commit comments

Comments
 (0)