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

🐞 [Bug]: Serve fails if folder path has space #212

Closed
Tanddant opened this issue Apr 10, 2024 · 5 comments · Fixed by #214
Closed

🐞 [Bug]: Serve fails if folder path has space #212

Tanddant opened this issue Apr 10, 2024 · 5 comments · Fixed by #214
Assignees
Labels
🐞 bug Something isn't working 💪 good first issue Good for newcomers 👨‍💻work in progress I am working on it

Comments

@Tanddant
Copy link
Contributor

📝 Describe the bug

When I press the serve button and the path to the folder has a space in it PowerShell cd fails

i.e if my project is stored at:

d:\Client name with spaces\Project 1

I'll get the following output:

cd d:\Client name with spaces\Project 1
> Set-Location: A positional parameter cannot be found that accepts argument 'name'.

👣 Steps To Reproduce

Steps to reproduce the behavior:

  1. Open a project that's stored in a path with a space in it
  2. Press the serve button

📜 Expected behavior

Serve my project.

💻 Desktop (please complete the following information):

  • OS: Windows 11
  • Browser N/A
  • Version 3.0.0

🤔 Additional context

Seems like all that's needed is to wrap the paramater containing the path in a set of quotes, I would love to help, but I have idea where to look in the code, so if anyone can point me in a direction I would love to help fix it

@Tanddant Tanddant added the 🐞 bug Something isn't working label Apr 10, 2024
@Adam-it
Copy link
Member

Adam-it commented Apr 10, 2024

hi @Tanddant 👋
Sorry to hear you are having trouble using SPFx Toolkit 😔 and thank you so so much for reporting the bug 🐞.
From what you descried I also (as you suggested) think that the path should be just wrapped in single quotes 👍.
Seems I totally forgot one may use space in folder names 😅.

... anyway. like 90% this is the place which should be fixed

TerminalCommandExecuter.runInTerminal(`cd ${currentProjectPath}`, terminal);

The TerminalCommandExecuter.runCommand method executes every of the gulp task commands. At the beginning it sets the user newly created terminal in right position which needs to be fixed.

Would you like to give it a try?
I am still working on better contributing guidance on this repo as it is a bit problematic but you may always follow along with the current Contribution guidelines and if anything seems wrong or stopping you from work just let me know either here or directly 👍

@Adam-it Adam-it added 🙏 help wanted Open for contributors 💪 good first issue Good for newcomers labels Apr 10, 2024
@Tanddant
Copy link
Contributor Author

For sure I'll give it a go! - never worked on a VS Code extension before, new stuff is always fun, feel free to assign me this task 😊

@Adam-it Adam-it added 👨‍💻work in progress I am working on it and removed 🙏 help wanted Open for contributors labels Apr 10, 2024
@Adam-it
Copy link
Member

Adam-it commented Apr 10, 2024

For sure I'll give it a go! - never worked on a VS Code extension before, new stuff is always fun, feel free to assign me this task 😊

Sold 🔨
VS Code extensions it's a world of its own 😅. Just like SPFx 😜
Let me know if you will need any help.

Adam-it pushed a commit that referenced this issue Apr 16, 2024
#214)

…o fail

## 🎯 Aim

Goal is to solve #212 

## 📷 Result

Folder path now wrapped in quotes

![image](https://github.com/pnp/vscode-viva/assets/6947024/02c83bdd-b71f-4773-8f4f-ce93787423c7)

## ✅ What was done

Hopefully nothing else needs to be done 🙌

## 🔗 Related issue

Closes: #212
@Adam-it
Copy link
Member

Adam-it commented Apr 16, 2024

@Adam-it
Copy link
Member

Adam-it commented Apr 16, 2024

hi @Tanddant,
Once again thank you for rising up the issue 👏 and solving it 🚀. You Rock 🤩
Your work was merged to dev branch as is part of the latest extension pre-release v3.0.1
pre-releases are no installed automatically and you will need to opt-in in VS Code if you wanna test out your changes and use the latest and greatest
image

Let's give it a 7 day period for pre-production use and see if anything comes up. After that I will merge this to the main and will create new minor release out of that 👍
If you have any doubts or questions please do not hesitate to ask
Once again thank you for your interest in making this product better 👏
Cheers mate 🍻

@Adam-it Adam-it closed this as completed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 💪 good first issue Good for newcomers 👨‍💻work in progress I am working on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants