From 6707d2272ea3c0da6f2aa752fe8452cfae2dd1b1 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink <17958158+jribbink@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:24:28 -0700 Subject: [PATCH] Fix Flow CLI configuration creation (#698) --- extension/src/flow-cli/cli-selection-provider.ts | 6 ------ extension/src/server/flow-config.ts | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/extension/src/flow-cli/cli-selection-provider.ts b/extension/src/flow-cli/cli-selection-provider.ts index 29034bf0..e883de55 100644 --- a/extension/src/flow-cli/cli-selection-provider.ts +++ b/extension/src/flow-cli/cli-selection-provider.ts @@ -5,8 +5,6 @@ import { SemVer } from 'semver' import { CliBinary } from './cli-versions-provider' const CHANGE_CLI_BINARY = 'cadence.changeFlowCliBinary' -const CADENCE_V1_CLI_REGEX = /-cadence-v1.0.0/g -// label with icon const GET_BINARY_LABEL = (version: SemVer): string => `Flow CLI v${version.format()}` export class CliSelectionProvider { @@ -158,7 +156,3 @@ class CustomBinaryItem implements vscode.QuickPickItem { this.label = 'Choose a custom version...' } } - -export function isCliCadenceV1 (version: SemVer): boolean { - return CADENCE_V1_CLI_REGEX.test(version.raw) -} diff --git a/extension/src/server/flow-config.ts b/extension/src/server/flow-config.ts index bb27ec43..fc7293cc 100644 --- a/extension/src/server/flow-config.ts +++ b/extension/src/server/flow-config.ts @@ -161,7 +161,7 @@ export class FlowConfig implements Disposable { return } - const didInit = await tryExecDefault('flow', ['init'], { cwd: rootPath }) + const didInit = await tryExecDefault('flow', ['init', '--config-only'], { cwd: rootPath }) if (!didInit) { void window.showErrorMessage('Failed to initialize Flow CLI configuration.')