-
Notifications
You must be signed in to change notification settings - Fork 4
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
Comments
@foxt can you please help with the your OS version. |
Hi @Shruti-MS, it's macOS Sonoma. |
I have exactly the same issue :-( @Shruti-MS |
I'm also experiencing the same problem since today, but on Windows.... |
Has anyone fixed this who has experienced it in the past? I'm also experiencing this issue. Version: 1.88.1 (user setup) |
Having the same issue when I am working in vscode + github codespace/devcontainer |
I'm also experiencing this problem, 7 months after the original post. Please fix this bug. MacOS Sonoma. |
const fs = require('fs'); // Function to append a slash prefix to a directory path // Function to check if a directory exists // Get the directory path from command-line arguments // Validate input 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. |
I'm not familiar with JavaScript. I installed Node and the Prettier
extension. The provided code reported problems so I made some changes. Here
is the code I debugged and the results after running.
const fs = require("fs");
const path = require("path");
// Function to append a slash prefix to a directory path
function appendSlashPrefixToDir(dir) {
console.log("Original dir:", dir);
if (!process.platform.startsWith("win")) {
dir = "/" + dir;
}
console.log("Updated dir:", dir);
return dir;
}
// Function to check if a directory exists
async function checkDirectory(value) {
console.log("checkDirectory called with:", 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 {
console.log(`${value} directory exists.`);
}
}
} else {
// macOS/Linux-specific code
value = value || "";
if (value !== "" && value.startsWith("/")) {
value = value.substring(1);
}
console.log("Processed value:", value);
if (value === "" || !fs.existsSync(appendSlashPrefixToDir(value))) {
console.error(`${value} directory does not exist.`);
} else {
console.log(`${value} directory exists.`);
}
}
}
// 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));
}
*Results:*PS /Users/xenesthis/VSCode/JavaScript> node test.js
/Users/xenesthis
checkDirectory called with: /Users/xenesthis
Processed value: Users/xenesthis
Original dir: Users/xenesthis
Updated dir: /Users/xenesthis
Users/xenesthis directory exists.
Directory check complete.
PS /Users/xenesthis/VSCode/JavaScript>
|
@Myraas Thanks for checking. While we fix the issue, can you try this workaround:-
In case you are not able to open settings due to this issue, Please check if this works. Thanks |
Thank you! This worked for me on MacOS.
Base path is updated to "/Users/User/AzureAutomation"
…On Sun, Aug 25, 2024 at 6:51 AM Shruti-MS ***@***.***> wrote:
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.png (view on web)
<https://github.com/user-attachments/assets/7e474eaa-0c16-4dc6-9805-20fee8752f11>
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.png (view on web)
<https://github.com/user-attachments/assets/bd4e469f-1987-4590-aba5-48f93dd9b81c>
Please check if this works.
Thanks
—
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIKF73Q4K27RTY5H47M6NJTZTHOM3AVCNFSM6AAAAABCNJX5J2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBYHA2TGOJSGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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
The text was updated successfully, but these errors were encountered: