vscode-laravel-artisan icon indicating copy to clipboard operation
vscode-laravel-artisan copied to clipboard

Docker Command doesn't change drives

Open sean64 opened this issue 4 years ago • 0 comments

Quick fix based on your existing code. When you get the chance to review.

--- a/src/Common.ts
+++ b/src/Common.ts
@@ -93,7 +93,11 @@ export default class Common {

     if (dockerEnabled) {
       command = `php artisan ${command}`
-      cmd = `cd ${artisanRoot} && ${dockerCommand} ${command}`
+      cmd = process.platform == 'win32' ?
+                // Windows command
+                `cd /d "${artisanRoot}" && ${dockerCommand} ${command}` :
+                // Unix command
+                `cd ${artisanRoot} && ${dockerCommand} ${command}`;
     } else {
       command = `"${phpLocation}" artisan ${command}`
       cmd = process.platform == 'win32' ?

sean64 avatar Jan 22 '21 05:01 sean64