diff --git a/extensions/notebook/src/jupyter/jupyterSessionManager.ts b/extensions/notebook/src/jupyter/jupyterSessionManager.ts index 2d4823edc0..7056677b63 100644 --- a/extensions/notebook/src/jupyter/jupyterSessionManager.ts +++ b/extensions/notebook/src/jupyter/jupyterSessionManager.ts @@ -9,7 +9,6 @@ import * as fs from 'fs-extra'; import * as nls from 'vscode-nls'; import * as vscode from 'vscode'; import * as path from 'path'; -import { EOL } from 'os'; import * as utils from '../common/utils'; const localize = nls.loadMessageBundle(); @@ -364,15 +363,15 @@ export class JupyterSession implements nb.ISession { let allCode: string = ''; // Ensure cwd matches notebook path (this follows Jupyter behavior) if (this.path && path.dirname(this.path)) { - allCode += `%cd ${path.dirname(this.path)}${EOL}`; + allCode += `%cd ${path.dirname(this.path)}\n`; } for (let i = 0; i < Object.keys(process.env).length; i++) { let key = Object.keys(process.env)[i]; if (key.toLowerCase() === 'path' && this._pythonEnvVarPath) { - allCode += `%set_env ${key}=${this._pythonEnvVarPath}${EOL}`; + allCode += `%set_env ${key}=${this._pythonEnvVarPath}\n`; } else { // Jupyter doesn't seem to alow for setting multiple variables at once, so doing it with multiple commands - allCode += `%set_env ${key}=${process.env[key]}${EOL}`; + allCode += `%set_env ${key}=${process.env[key]}\n`; } }