mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Fix shell tool paths
This commit is contained in:
2 files changed
+3
-11
No files matched your search
@@ -104,18 +104,10 @@ export function Terminal({ projectId, className }: TerminalProps) {
|
||||
|
||||
// Check if running in Electron - use real shell
|
||||
if (window.electron?.shell) {
|
||||
// Get relative path from projects root
|
||||
// Remove the projectsPath prefix to get the relative path for the OS
|
||||
const projectsPrefix = projectsPath.endsWith('/')
|
||||
? projectsPath
|
||||
: projectsPath + '/';
|
||||
|
||||
// Use the full path (with ~ if present) - Electron will expand it
|
||||
const fullCwd = `${projectsPath}/${projectId}`;
|
||||
const relativeCwd = fullCwd.startsWith(projectsPrefix)
|
||||
? fullCwd.substring(projectsPrefix.length)
|
||||
: fullCwd;
|
||||
|
||||
const result = await window.electron.shell.exec(command, relativeCwd);
|
||||
const result = await window.electron.shell.exec(command, fullCwd);
|
||||
|
||||
// Format output
|
||||
let output = '';
|
||||
|
||||
Reference in new issue
Block a user