From: Ian Jackson Date: Sun, 10 May 2020 17:41:40 +0000 (+0100) Subject: nailing-cargo: wip, bugfixes X-Git-Tag: nailing-cargo/1.0.0~215 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=06676f48146a175d5ff860729f565f8f3937d111;p=nailing-cargo.git nailing-cargo: wip, bugfixes Signed-off-by: Ian Jackson --- diff --git a/nailing-cargo b/nailing-cargo index c9efaaf..0997cdc 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -43,6 +43,7 @@ our $self; use strict; use POSIX; +use Types::Serialiser; BEGIN { $self = $0; $self =~ s{^.*/(?=.)}{}; @@ -339,6 +340,19 @@ END $pre =~ s/^\s+//mg; $pre =~ s/^\s+\n/ /g; $post =~ s/^\s+//mg; $post =~ s/^\s+\n/ /g; } + my $addpath = (cfg qw(oot path_add)) // + $use eq 'really' ? Types::Serialiser::true : Types::Serialiser::false; + $addpath = + !Types::Serialiser::is_bool $addpath ? $addpath : + $addpath ? '$HOME/.cargo/bin' : + undef; + if (defined $addpath) { + $pre .= <= 2 ? 'xe' : 'e';