Fossil SCM

For the "fossil ui remote:/" and the "fossil patch push/pull" commands, when going over SSH, add the argument "PATH=$HOME/bin:$PATH" to the command line so that the "fossil" executable can be found in the users home directory. This is important on system like Mac where the default PATH for SSH consists of only unwritable directories.

drh 2023-06-18 00:22 trunk
Commit 8cb116407933bb3b88f7ebf9ffea31f390ab5b872b01b03db656303435463bbd
2 files changed +2 -2 +1
+2 -2
--- src/main.c
+++ src/main.c
@@ -3343,12 +3343,12 @@
33433343
transport_ssh_command(&ssh);
33443344
db_close_config();
33453345
if( zFossilCmd==0 ) zFossilCmd = "fossil";
33463346
blob_appendf(&ssh,
33473347
" -t -L 127.0.0.1:%d:127.0.0.1:%d %!$"
3348
- " %$ ui --nobrowser --localauth --port %d",
3349
- iPort, iPort, zRemote, zFossilCmd, iPort);
3348
+ " %$ %$ ui --nobrowser --localauth --port %d",
3349
+ iPort, iPort, zRemote, "PATH=$HOME/bin:$PATH", zFossilCmd, iPort);
33503350
if( zNotFound ) blob_appendf(&ssh, " --notfound %!$", zNotFound);
33513351
if( zFileGlob ) blob_appendf(&ssh, " --files-urlenc %T", zFileGlob);
33523352
if( g.zCkoutAlias ) blob_appendf(&ssh, " --ckout-alias %!$",g.zCkoutAlias);
33533353
if( g.zExtRoot ) blob_appendf(&ssh, " --extroot %$", g.zExtRoot);
33543354
if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use());
33553355
--- src/main.c
+++ src/main.c
@@ -3343,12 +3343,12 @@
3343 transport_ssh_command(&ssh);
3344 db_close_config();
3345 if( zFossilCmd==0 ) zFossilCmd = "fossil";
3346 blob_appendf(&ssh,
3347 " -t -L 127.0.0.1:%d:127.0.0.1:%d %!$"
3348 " %$ ui --nobrowser --localauth --port %d",
3349 iPort, iPort, zRemote, zFossilCmd, iPort);
3350 if( zNotFound ) blob_appendf(&ssh, " --notfound %!$", zNotFound);
3351 if( zFileGlob ) blob_appendf(&ssh, " --files-urlenc %T", zFileGlob);
3352 if( g.zCkoutAlias ) blob_appendf(&ssh, " --ckout-alias %!$",g.zCkoutAlias);
3353 if( g.zExtRoot ) blob_appendf(&ssh, " --extroot %$", g.zExtRoot);
3354 if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use());
3355
--- src/main.c
+++ src/main.c
@@ -3343,12 +3343,12 @@
3343 transport_ssh_command(&ssh);
3344 db_close_config();
3345 if( zFossilCmd==0 ) zFossilCmd = "fossil";
3346 blob_appendf(&ssh,
3347 " -t -L 127.0.0.1:%d:127.0.0.1:%d %!$"
3348 " %$ %$ ui --nobrowser --localauth --port %d",
3349 iPort, iPort, zRemote, "PATH=$HOME/bin:$PATH", zFossilCmd, iPort);
3350 if( zNotFound ) blob_appendf(&ssh, " --notfound %!$", zNotFound);
3351 if( zFileGlob ) blob_appendf(&ssh, " --files-urlenc %T", zFileGlob);
3352 if( g.zCkoutAlias ) blob_appendf(&ssh, " --ckout-alias %!$",g.zCkoutAlias);
3353 if( g.zExtRoot ) blob_appendf(&ssh, " --extroot %$", g.zExtRoot);
3354 if( skin_in_use() ) blob_appendf(&ssh, " --skin %s", skin_in_use());
3355
--- src/patch.c
+++ src/patch.c
@@ -692,10 +692,11 @@
692692
Blob remote;
693693
*(char*)(zDir-1) = 0;
694694
transport_ssh_command(&cmd);
695695
blob_appendf(&cmd, " -T");
696696
blob_append_escaped_arg(&cmd, zRemote, 0);
697
+ blob_append_escaped_arg(&cmd, "PATH=$HOME/bin:$PATH", 0);
697698
blob_init(&remote, 0, 0);
698699
if( zFossilCmd==0 ) zFossilCmd = "fossil";
699700
blob_appendf(&remote, "%$ patch %s%s --dir64 %z -",
700701
zFossilCmd, zRemoteCmd, zForce, encode64(zDir, -1));
701702
blob_append_escaped_arg(&cmd, blob_str(&remote), 0);
702703
--- src/patch.c
+++ src/patch.c
@@ -692,10 +692,11 @@
692 Blob remote;
693 *(char*)(zDir-1) = 0;
694 transport_ssh_command(&cmd);
695 blob_appendf(&cmd, " -T");
696 blob_append_escaped_arg(&cmd, zRemote, 0);
 
697 blob_init(&remote, 0, 0);
698 if( zFossilCmd==0 ) zFossilCmd = "fossil";
699 blob_appendf(&remote, "%$ patch %s%s --dir64 %z -",
700 zFossilCmd, zRemoteCmd, zForce, encode64(zDir, -1));
701 blob_append_escaped_arg(&cmd, blob_str(&remote), 0);
702
--- src/patch.c
+++ src/patch.c
@@ -692,10 +692,11 @@
692 Blob remote;
693 *(char*)(zDir-1) = 0;
694 transport_ssh_command(&cmd);
695 blob_appendf(&cmd, " -T");
696 blob_append_escaped_arg(&cmd, zRemote, 0);
697 blob_append_escaped_arg(&cmd, "PATH=$HOME/bin:$PATH", 0);
698 blob_init(&remote, 0, 0);
699 if( zFossilCmd==0 ) zFossilCmd = "fossil";
700 blob_appendf(&remote, "%$ patch %s%s --dir64 %z -",
701 zFossilCmd, zRemoteCmd, zForce, encode64(zDir, -1));
702 blob_append_escaped_arg(&cmd, blob_str(&remote), 0);
703

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button