Skip to content

Commit

Permalink
Fix Flow CLI configuration creation (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink authored Oct 25, 2024
1 parent 7e1095a commit 6707d22
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions extension/src/flow-cli/cli-selection-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion extension/src/server/flow-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down

0 comments on commit 6707d22

Please sign in to comment.