-
Notifications
You must be signed in to change notification settings - Fork 1k
utilize updated values from settings config #8882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,7 @@ export function setTerminalEnvVars(env: Record<string, string>) { | |
} | ||
|
||
export function runCommand(command: string) { | ||
const settings = getSettings(); | ||
setTerminalEnvVars(settings.extraEnv ?? {}); | ||
setTerminalEnvVars(getSettings().extraEnv ?? {}); | ||
hlshen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const terminalOptions: TerminalOptions = { | ||
name: "Data Connect Terminal", | ||
env: environmentVariables, | ||
|
@@ -31,7 +30,7 @@ export function runCommand(command: string) { | |
if (currentProjectId.value) { | ||
command = `${command} --project ${currentProjectId.value}`; | ||
} | ||
if (settings.debug) { | ||
if (getSettings().debug) { | ||
command = `${command} --debug`; | ||
} | ||
terminal.sendText(command); | ||
|
@@ -42,8 +41,7 @@ export function runTerminalTask( | |
command: string, | ||
presentationOptions: vscode.TaskPresentationOptions = { focus: true }, | ||
): Promise<string> { | ||
const settings = getSettings(); | ||
setTerminalEnvVars(settings.extraEnv ?? {}); | ||
setTerminalEnvVars(getSettings().extraEnv ?? {}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to export function runTerminalTask(
taskName: string,
command: string,
presentationOptions: vscode.TaskPresentationOptions = { focus: true },
): Promise<string> {
const settings = getSettings();
setTerminalEnvVars(settings.extraEnv ?? {}); |
||
const type = "firebase-" + Date.now(); | ||
return new Promise(async (resolve, reject) => { | ||
vscode.tasks.onDidEndTaskProcess(async (e) => { | ||
|
@@ -66,7 +64,7 @@ export function runTerminalTask( | |
vscode.TaskScope.Workspace, | ||
taskName, | ||
"firebase", | ||
new vscode.ShellExecution(`${command}${settings.debug ? " --debug" : ""}`, executionOptions), | ||
new vscode.ShellExecution(`${command}${getSettings().debug ? " --debug" : ""}`, executionOptions), | ||
); | ||
task.presentationOptions = presentationOptions; | ||
await vscode.tasks.executeTask(task); | ||
|
@@ -77,21 +75,20 @@ export function registerTerminalTasks( | |
broker: ExtensionBrokerImpl, | ||
analyticsLogger: AnalyticsLogger, | ||
): Disposable { | ||
const settings = getSettings(); | ||
|
||
const loginTaskBroker = broker.on("executeLogin", () => { | ||
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.IDX_LOGIN); | ||
runTerminalTask( | ||
"firebase login", | ||
`${settings.firebasePath} login --no-localhost`, | ||
`${getSettings().firebasePath} login --no-localhost`, | ||
).then(() => { | ||
checkLogin(); | ||
}); | ||
}); | ||
|
||
const startEmulatorsTask = () => { | ||
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.START_EMULATORS); | ||
|
||
const settings = getSettings(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
let cmd = `${settings.firebasePath} emulators:start --project ${currentProjectId.value}`; | ||
|
||
if (settings.importPath) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.