mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 16:15:17 +00:00
fix: load profile on remote commands
This commit is contained in:
1 parent
1b6546d26c
commit
34febe670d
4 files changed
+5
-5
No files matched your search
@@ -108,8 +108,8 @@ class ExecuteContainerCommand extends Component
|
||||
$this->validate();
|
||||
try {
|
||||
// Wrap command to prevent escaped execution in the host.
|
||||
$cmd = 'sh -c "' . str_replace('"', '\"', $this->command) . '"';
|
||||
|
||||
$cmd = 'sh -c "if [ -f ~/.profile ]; then . ~/.profile; fi; ' . str_replace('"', '\"', $this->command) . '"';
|
||||
ray($cmd);
|
||||
if (!empty($this->workDir)) {
|
||||
$exec = "docker exec -w {$this->workDir} {$this->container} {$cmd}";
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user