From 06676f48146a175d5ff860729f565f8f3937d111 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 10 May 2020 18:41:40 +0100 Subject: [PATCH] nailing-cargo: wip, bugfixes Signed-off-by: Ian Jackson --- nailing-cargo | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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'; -- 2.30.2