Skip to content
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

Use remote file handle for git init step #5118

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const showNewProjectModalDialog = async (

// Create the new project configuration.
const newProjectConfig: NewProjectConfiguration = {
folderScheme: folder.scheme,
runtimeMetadata: result.selectedRuntime || undefined,
projectType: result.projectType || '',
projectFolder: folder.fsPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export enum NewProjectTask {
* NewProjectConfiguration interface. Defines the configuration for a new project.
*/
export interface NewProjectConfiguration {
readonly folderScheme: string;
readonly runtimeMetadata: ILanguageRuntimeMetadata | undefined;
readonly projectType: string;
readonly projectFolder: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { URI } from 'vs/base/common/uri';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { localize } from 'vs/nls';
import { IRuntimeSessionService } from 'vs/workbench/services/runtimeSession/common/runtimeSessionService';
import { Schemas } from 'vs/base/common/network';

/**
* PositronNewProjectService class.
Expand Down Expand Up @@ -327,7 +328,7 @@ export class PositronNewProjectService extends Disposable implements IPositronNe
* Relies on extension vscode.git
*/
private async _runGitInit() {
const projectRoot = URI.file(this._newProjectConfig?.projectFolder!);
const projectRoot = URI.from({ scheme: this._newProjectConfig?.folderScheme ?? Schemas.file, path: this._newProjectConfig?.projectFolder });

// true to skip the folder prompt
await this._commandService.executeCommand('git.init', true)
Expand Down