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

"please input local working directory" causes VSCode to become unusable #58

Open
foxt opened this issue Jan 27, 2024 · 11 comments
Open

Comments

@foxt
Copy link

foxt commented Jan 27, 2024

Hello,

I just signed into Azure in VS Code, and every time I try to invoke the Azure tab in VSCode I get a box asking for a local working directory. I either enter a path or select enter and then it gets stuck in a loop of bringing focus to the textbox and clearing the textbox, meaning I cannot use VSCode until I quit it and restart it.

Screen.Recording.2024-01-27.at.11.49.38.mov
@Shruti-MS
Copy link
Contributor

@foxt can you please help with the your OS version.

@foxt
Copy link
Author

foxt commented Feb 2, 2024

@foxt can you please help with the your OS version.

Hi @Shruti-MS, it's macOS Sonoma.

@dinoinyourhead
Copy link

I have exactly the same issue :-( @Shruti-MS

@Fe-Roth-lix
Copy link

I'm also experiencing the same problem since today, but on Windows....

@mattpeach1484
Copy link

Has anyone fixed this who has experienced it in the past? I'm also experiencing this issue.

Version: 1.88.1 (user setup)
Commit: e170252f762678dec6ca2cc69aba1570769a5d39
Date: 2024-04-10T17:41:02.734Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

@KingBain
Copy link

Having the same issue when I am working in vscode + github codespace/devcontainer

@Myraas
Copy link

Myraas commented Aug 24, 2024

I'm also experiencing this problem, 7 months after the original post. Please fix this bug. MacOS Sonoma.

@Shruti-MS
Copy link
Contributor

const fs = require('fs');
const path = require('path');

// Function to append a slash prefix to a directory path
function appendSlashPrefixToDir(dir) {
if (!process.platform.startsWith("win")) {
dir = '/' + dir;
}
return dir;
}

// Function to check if a directory exists
async function checkDirectory(value) {
if (process.platform.startsWith("win")) {
// Windows-specific code
value = value || "";
if (value === "") {
console.error('${value}' directory does not exist.);
} else {
if (!fs.existsSync(value)) {
console.error('${value}' directory does not exist.);
}
}
} else {
// macOS/Linux-specific code
value = value || "";
if (value !== "" && value.startsWith("/")) {
value = value.substring(1);
}
if (value === "" || !fs.existsSync(appendSlashPrefixToDir(value))) {
console.error('${value}' directory does not exist.);
}
}
}

// Get the directory path from command-line arguments
const dirPath = process.argv[2];

// Validate input
if (!dirPath) {
console.log('Please provide a directory path as a command-line argument.');
} else {
checkDirectory(dirPath).then(() => console.log('Directory check complete.')).catch(err => console.error('Error:', err));
}

Please can you run this js script once and check why your input directory is not taken as valid input....Would help us in finding the bug. As from our end it is not reproducible.

Thanks for support.

@Myraas
Copy link

Myraas commented Aug 24, 2024 via email

@Shruti-MS
Copy link
Contributor

Shruti-MS commented Aug 25, 2024

@Myraas Thanks for checking.

While we fix the issue, can you try this workaround:-

  1. Open Settings in Visual Studio Code
  2. Go to Workspace ---> Extensions
  3. Go to Azure Automation
  4. Edit Directory>Base Path variable , put your desired path here
    image

In case you are not able to open settings due to this issue,
In your current workspace under .vscode folder , settings.json file would be created edit azureAutomation.directory.basePath variable there
image

Please check if this works.

Thanks

@Myraas
Copy link

Myraas commented Sep 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants