mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-14 19:31:30 +00:00
fixes
This commit is contained in:
@@ -123,6 +123,9 @@ export const copyGlobalEnvironment = ({ name, environmentUid: baseEnvUid }) => (
|
||||
const { workspaceUid, workspacePath } = getWorkspaceContext(state);
|
||||
const globalEnvironments = state.globalEnvironments.globalEnvironments;
|
||||
const baseEnv = globalEnvironments?.find((env) => env?.uid == baseEnvUid);
|
||||
if (!baseEnv) {
|
||||
return reject(new Error('Base environment not found'));
|
||||
}
|
||||
const uid = uuid();
|
||||
const environment = { uid, name, variables: baseEnv.variables };
|
||||
const { ipcRenderer } = window;
|
||||
|
||||
@@ -69,12 +69,12 @@ class DefaultWorkspaceManager {
|
||||
try {
|
||||
const shouldMigrate = this.needsMigration();
|
||||
const newWorkspacePath = await this.initializeDefaultWorkspace(null, { migrateFromPreferences: shouldMigrate });
|
||||
const workspaceYmlPath = path.join(existingPath, 'workspace.yml');
|
||||
const workspaceYmlPath = path.join(newWorkspacePath, 'workspace.yml');
|
||||
if (!fs.existsSync(workspaceYmlPath)) {
|
||||
this.defaultWorkspacePath = null;
|
||||
} else {
|
||||
return {
|
||||
workspacePath: existingPath,
|
||||
workspacePath: newWorkspacePath,
|
||||
workspaceUid: this.getDefaultWorkspaceUid()
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user