mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-06 17:23:53 -05:00
Add allow root setting for Ubuntu and Web Mode users (#16027)
* add allow root setting for Ubuntu and Web Mode users
This commit is contained in:
@@ -24,6 +24,7 @@ export const pinnedBooksConfigKey = 'pinnedNotebooks';
|
||||
export const maxBookSearchDepth = 'maxBookSearchDepth';
|
||||
export const remoteBookDownloadTimeout = 'remoteBookDownloadTimeout';
|
||||
export const collapseBookItems = 'collapseBookItems';
|
||||
export const allowRoot = 'allowRoot';
|
||||
|
||||
export const winPlatform = 'win32';
|
||||
export const macPlatform = 'darwin';
|
||||
|
||||
@@ -204,12 +204,16 @@ export class PerFolderServerInstance implements IServerInstance {
|
||||
* started when the log message with URL to connect to is emitted.
|
||||
*/
|
||||
protected async startInternal(): Promise<void> {
|
||||
let startCommand: string;
|
||||
let notebookConfig: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration(constants.notebookConfigKey);
|
||||
let allowRoot: boolean = notebookConfig.get(constants.allowRoot);
|
||||
if (this.isStarted) {
|
||||
return;
|
||||
}
|
||||
let notebookDirectory = this.getNotebookDirectory();
|
||||
this._token = await utils.getRandomToken();
|
||||
let startCommand = `"${this.options.install.pythonExecutable}" "${this.notebookScriptPath}" --no-browser --ip=127.0.0.1 --allow-root --no-mathjax --notebook-dir "${notebookDirectory}" --NotebookApp.token=${this._token}`;
|
||||
const allowRootParam = allowRoot ? '--allow-root' : '';
|
||||
startCommand = `"${this.options.install.pythonExecutable}" "${this.notebookScriptPath}" --no-browser --ip=127.0.0.1 ${allowRootParam} --no-mathjax --notebook-dir "${notebookDirectory}" --NotebookApp.token=${this._token}`;
|
||||
this.notifyStarting(this.options.install, startCommand);
|
||||
|
||||
// Execute the command
|
||||
|
||||
Reference in New Issue
Block a user