Skip to content

Commit ad76c77

Browse files
authored
Fix default local setting, should be TASKHUB_NAME (#4647)
1 parent 3bb06ae commit ad76c77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/commands/createFunction/durableSteps/DurableProjectConfigureStep.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { AzExtFsExtra, AzureWizardExecuteStepWithActivityOutput, parseError, type IParsedError } from '@microsoft/vscode-azext-utils';
6+
import { AzExtFsExtra, AzureWizardExecuteStepWithActivityOutput, nonNullValue, parseError, type IParsedError } from '@microsoft/vscode-azext-utils';
77
import * as path from "path";
88
import { type Progress } from 'vscode';
99
import { ConnectionKey, DurableBackend, hostFileName, ProjectLanguage } from '../../../constants';
@@ -16,6 +16,7 @@ import { cpUtils } from '../../../utils/cpUtils';
1616
import { durableUtils } from '../../../utils/durableUtils';
1717
import { pythonUtils } from '../../../utils/pythonUtils';
1818
import { venvUtils } from '../../../utils/venvUtils';
19+
import { tryGetVariableSubstitutedKey } from '../../appSettings/connectionSettings/getVariableSubstitutedKey';
1920
import { type IFunctionWizardContext } from '../IFunctionWizardContext';
2021

2122
export class DurableProjectConfigureStep<T extends IFunctionWizardContext> extends AzureWizardExecuteStepWithActivityOutput<T> {
@@ -87,7 +88,7 @@ export class DurableProjectConfigureStep<T extends IFunctionWizardContext> exten
8788
ext.outputChannel.appendLog(localize('extensionBundlePreview', 'Updated "host.json" extension bundle to preview version to enable new DTS features.'));
8889
}
8990
await setLocalAppSetting(context, context.projectPath, ConnectionKey.DTS, '', MismatchBehavior.Overwrite);
90-
await setLocalAppSetting(context, context.projectPath, ConnectionKey.DTSHub, '', MismatchBehavior.Overwrite);
91+
await setLocalAppSetting(context, context.projectPath, nonNullValue(tryGetVariableSubstitutedKey(ConnectionKey.DTSHub)), '', MismatchBehavior.Overwrite);
9192
break;
9293
case DurableBackend.SQL:
9394
hostJson.extensions.durableTask = this.getDefaultSqlTaskConfig();

0 commit comments

Comments
 (0)