Skip to content

Commit

Permalink
Allow the running of unsaved files (#1707)
Browse files Browse the repository at this point in the history
The additional check for the ".qs" extension in the program config
prevented using single file, unsaved buffers with language mode set to
Q# in run and debug. Removing this fixes the issue.
  • Loading branch information
swernli authored Jul 9, 2024
1 parent d43b2f7 commit be3d891
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions vscode/src/programConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import { IProjectConfig, ProgramConfig } from "qsharp-lang";
import * as vscode from "vscode";
import { Utils } from "vscode-uri";
import { isQsharpDocument } from "./common";
import { getTarget } from "./config";
import { loadProject } from "./projectSystem";
Expand Down Expand Up @@ -76,10 +75,6 @@ export function getActiveQSharpDocumentUri(): vscode.Uri | undefined {
export async function getProgramForDocument(
docUri: vscode.Uri,
): Promise<FullProgramConfigOrError> {
if (Utils.extname(docUri) !== ".qs") {
return { success: false, errorMsg: `${docUri.fsPath} is not a Q# file` };
}

// Target profile comes from settings
const profile = getTarget();

Expand Down

0 comments on commit be3d891

Please sign in to comment.