From 9801a32cf7607e0bbf94865a7d6690c92597cf61 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 16 Mar 2016 11:54:29 +0100 Subject: [PATCH] dbq use env --- bin/dbq | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/dbq b/bin/dbq index 23e79bd5..ebfddc27 100755 --- a/bin/dbq +++ b/bin/dbq @@ -3,6 +3,7 @@ use strict; use warnings; use Encode; use URI::Escape; +use File::Spec; use NB::Functions qw/html2txt/; use NB qw/$ROOT_DIR/; ################################################################################# @@ -99,7 +100,9 @@ $url =~ s,^(\w+://)?([^@]+)@(.*?)$,$1$3, and push(@EXEC,"db=$2"); $url =~ m@^ssh://(.*)$@ and $Opt{ssh} = $1; #die "$url | ",join(' ',@EXEC); -exec('ssh',$Opt{ssh},$NAME,map{s/"/\\"/g;'"'.$_.'"'} @EXEC) if $Opt{ssh}; +exec('ssh',$Opt{ssh},'/usr/bin/env',"PATH=$ENV{PATH}","PERL5LIB=$ENV{PERL5LIB}",$NAME,map{s/"/\\"/g;'"'.$_.'"'} @EXEC) if $Opt{ssh}; +#exec('ssh',$Opt{ssh},$NAME,map{s/"/\\"/g;'"'.$_.'"'} @EXEC) if $Opt{ssh}; +#exec('ssh',$Opt{ssh},File::Spec->rel2abs($0),map{s/"/\\"/g;'"'.$_.'"'} @EXEC) if $Opt{ssh}; # # Add options to ARGV -- 2.47.3