Comments (6)
@CallumCarmicheal in your settings.json
add the following property:
"artisan.location": ["${workspaceFolder}\\artisan"]
...looking through the source of the plugin I noticed this object property after erroneously missing it in the Settings UI
which I don't use as much as going straight to the *.json
file.
So your settings.json
might look like:
{
// ...snipped...
// with or without extension depending if loading from WSL etcy
"artisan.php.location": "C:/path/to/php.exe",
// one or more locations to artisan
"artisan.location": ["${workspaceFolder}\\artisan"]
// ...snipped...
}
Useful reading: https://code.visualstudio.com/docs/editor/variables-reference
from vscode-laravel-artisan.
@userabuser I have tried to set this setting with the variable although it gets printed out as a literal.
[CMD] "php" artisan route:list
[ERR] Command failed: cd /d "\${workspaceFolder}\chaotic" && "php" artisan route:list
The system cannot find the path specified.
It states in the documentation that the variables are only supported inside tasks.json and launch.json.
Variable substitution is supported inside key and value strings in
launch.json
andtasks.json
files using ${variableName} syntax.
After checking this issue was gone when i decided to open the folder (not the workspace), which allowed me to see another problem. Even when the path is fully inside the command it still fails, i believe that might have something to do with powershell as i get this error when running the command (which will work fine in CMD)
Set-Location : A positional parameter cannot be found that accepts argument 'd:\Programming\laravel\chaotic'.
At line:1 char:1
+ cd /d "d:\Programming\larvel\cha...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-Location], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
from vscode-laravel-artisan.
Within the code, the only thing I can really think of is that that it is finding an "additional location" somehow, which is empty. and returning that value which it looks for all artisan locations within your project.
Does this possibly help? I added an additional check to see if the artisan path is not an empty string:
if (list.length == 1 && list[0].fsPath.length) return list[0].fsPath
laravel-artisan-0.0.26.vsix.zip
Side Note: I believe that Powershell, cmd, etc. support /
as well as \
from vscode-laravel-artisan.
Im still getting the same output,
workbench.main.js:238 [Extension Host]
Error: Command failed: cd /d "d:\Programming\Reversing\Xbox\Resources\Development\C360\Panel\laravel\chaotic" && "php" artisan route:list
(See output console for more details)
I'm not really sure what this issue is, I'll clone the repo and do some testing on my side tomorrow when I get home, thank you for the help.
from vscode-laravel-artisan.
Housekeeping, closing due to inactivity.
from vscode-laravel-artisan.
The solution to this is to set settings.json artisan.location to the root or your project, where the artisan file is located.
for example in settings.json: "artisan.location": "C:/xampp/htdocs/ProjectName"
from vscode-laravel-artisan.
Related Issues (20)
- getting error after update HOT 8
- Display Panel always shows "Loading Route Information..." HOT 6
- Publish the extension to Open VSX HOT 1
- Docker commands executed but not taking effect HOT 1
- command failed HOT 1
- Command 'Artisan: Optimize' resulted in an error (command 'artisan.optimize' not found) HOT 7
- Extension issue
- Markdown with "Make Mail" HOT 3
- Extension issue
- Extension issue
- Extension issue
- Add the license for your code and publish to open-vsx.org HOT 2
- why this plugin isn't working? HOT 1
- Missing Make component HOT 3
- Add sail compatibility HOT 3
- Suppoprt the new Laravel 9 artisan route:list command HOT 1
- Error command 'artisan.make.middleware' not found HOT 2
- Can you add datatable support HOT 2
- Artisan make:whatever in folder
- Empty output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-laravel-artisan.