my @xargs;
if (!$cargo_lock_update) {
push @xargs, $build_absdir;
- ($pre, $post) = ('cd "$1"; shift;', '');
+ ($pre, $post) = ('cd "$1"; shift; ', '');
} else {
push @xargs, $oot_absdir, $subdir, $src_absdir;
$pre = <<'END';
cp -- "$1"/Cargo.lock .;
ENDLK
$pre .= <<'ENDPRE';
- shift
+ shift;
mkdir -p src; >src/lib.rs;
ENDPRE
$post = <<'ENDPOST';
rm -r src Cargo.toml;
ENDPOST
- $pre =~ s/^\s+//mg; $pre =~ s/^\s+\n/ /g;
- $post =~ s/^\s+//mg; $post =~ s/^\s+\n/ /g;
}
my $addpath = (cfg_uc qw(oot path_add)) //
$use eq 'really' ? Types::Serialiser::true : Types::Serialiser::false;
export PATH;
END
}
+ $pre =~ s/^\s+//mg; $pre =~ s/\s+/ /g;
+ $post =~ s/^\s+//mg; $post =~ s/\s+/ /g;
my $getuser = sub { cfgsn qw(oot user) };
my @command;
my $xe = $verbose >= 2 ? 'xe' : 'e';
my $sh_ec = sub {
if (!length $post) {
- @command = (@_, 'sh',"-${xe}c",$pre.' exec "$@"','--',@xargs);
+ @command = (@_, 'sh',"-${xe}c",$pre.'exec "$@"','--',@xargs);
} else {
- @command = (@_, 'sh',"-${xe}c",$pre.' "$@"; '.$post,'--',@xargs);
+ @command = (@_, 'sh',"-${xe}c",$pre.'"$@"; '.$post,'--',@xargs);
}
push @command, @ARGV;
};