[gnome-builder] libide/terminal: Start in the project directory
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/terminal: Start in the project directory
- Date: Thu, 14 Jul 2022 19:30:36 +0000 (UTC)
commit 6e2feaf2798a534c295f0bb96385fd97c58310b4
Author: JCWasmx86 <JCWasmx86 t-online de>
Date: Thu Jul 14 11:09:38 2022 +0200
libide/terminal: Start in the project directory
src/libide/terminal/ide-terminal-run-command.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/libide/terminal/ide-terminal-run-command.c b/src/libide/terminal/ide-terminal-run-command.c
index 03cbe65d3..1f37c3a59 100644
--- a/src/libide/terminal/ide-terminal-run-command.c
+++ b/src/libide/terminal/ide-terminal-run-command.c
@@ -41,6 +41,8 @@ ide_terminal_run_command_prepare_to_run (IdeRunCommand *run_command,
{
IdeTerminalRunCommand *self = (IdeTerminalRunCommand *)run_command;
const char *user_shell;
+ g_autoptr(GFile) workdir = NULL;
+ g_autofree char *workdir_path = NULL;
IDE_ENTRY;
@@ -50,10 +52,13 @@ ide_terminal_run_command_prepare_to_run (IdeRunCommand *run_command,
g_assert (IDE_IS_CONTEXT (context));
user_shell = ide_get_user_shell ();
+ workdir = ide_context_ref_workdir (context);
+ workdir_path = g_file_get_path (workdir);
switch (self->locality)
{
case IDE_TERMINAL_RUN_ON_HOST:
+ ide_run_context_set_cwd (run_context, workdir_path);
ide_run_context_push_host (run_context);
ide_run_context_add_minimal_environment (run_context);
ide_run_context_append_argv (run_context, user_shell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]