Bugzilla – Attachment 106515 Details for
Bug 25752
Current directory not kept when using koha-shell
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25752: Stay in cwd after koha-shell
Bug-25752-Stay-in-cwd-after-koha-shell.patch (text/plain), 1.59 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-07-03 14:04:31 UTC
(
hide
)
Description:
Bug 25752: Stay in cwd after koha-shell
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-07-03 14:04:31 UTC
Size:
1.59 KB
patch
obsolete
>From 25b2b4de8de64572ac53677808808c1809e0922b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 15 Jun 2020 16:11:49 +0200 >Subject: [PATCH] Bug 25752: Stay in cwd after koha-shell > >After bug 25538, after a koha-shell we are not longer in the current directory: > >root@cec7bffd8100:koha(master)$ pwd >/kohadevbox/koha >root@cec7bffd8100:koha(master)$ sudo koha-shell kohadev >kohadev-koha@cec7bffd8100:~$ pwd >/var/lib/koha/kohadev > >Test plan: >Repeat the commands above and confirm that with this version of the >script you get /kohadevbox/koha inside the koha-shell > >Search for possible regressions > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > debian/scripts/koha-shell | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-shell b/debian/scripts/koha-shell >index 7e6770f590a..eb59909f0f8 100755 >--- a/debian/scripts/koha-shell >+++ b/debian/scripts/koha-shell >@@ -20,6 +20,7 @@ use Modern::Perl; > > Getopt::Long::Configure("bundling"); > >+my $pwd = `pwd`; > my %opts; > my $res = GetOptions( \%opts, "command|c=s", "help|h", "login|l", "shell|s=s", > "preserve-environment|p|m", "verbose|v" ); >@@ -51,7 +52,7 @@ push @su_args, > "env " > . "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml " > . "PERL5LIB=$perl5lib $shell" >- . ( $opts{command} ? " -c '$opts{command}'" : '' ); >+ . ( $opts{command} ? " -c '$opts{command}'" : " -c 'cd \"$pwd\"; $shell'" ); > > print "Command: '".join("' '",@su_args)."'\n" if $opts{verbose}; > system("@su_args"); >-- >2.27.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25752
:
105884
|
106386
| 106515