From 836bf1d28a4d56b3264b20bdd9c65cd689e9b467 Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Wed, 30 Oct 2019 15:02:30 -0700 Subject: [PATCH] use addtionalEnvironmentVariables (#8123) --- .../resource-deployment/src/services/notebookService.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/resource-deployment/src/services/notebookService.ts b/extensions/resource-deployment/src/services/notebookService.ts index 614e405bce..e76e51b219 100644 --- a/extensions/resource-deployment/src/services/notebookService.ts +++ b/extensions/resource-deployment/src/services/notebookService.ts @@ -79,11 +79,15 @@ export class NotebookService implements INotebookService { const workingDirectory = this.platformService.storagePath(); const notebookFullPath = path.join(workingDirectory, fileName); const outputFullPath = path.join(workingDirectory, `output-${fileName}`); + const additionalEnvironmentVariables: NodeJS.ProcessEnv = env || {}; + // Set the azdata eula + // Scenarios using the executeNotebook feature already have the EULA acceptted by the user before executing this. + additionalEnvironmentVariables['ACCEPT_EULA'] = 'yes'; try { await this.platformService.saveTextFile(content, notebookFullPath); await this.platformService.runCommand(`azdata notebook run --path "${notebookFullPath}" --output-path "${workingDirectory}" --timeout -1`, { - additionalEnvironmentVariables: env, + additionalEnvironmentVariables: additionalEnvironmentVariables, workingDirectory: workingDirectory }); return {