Skip to content

Commit

Permalink
Eliminating shell injections
Browse files Browse the repository at this point in the history
  • Loading branch information
2colours committed Jan 5, 2024
1 parent e63a265 commit 9b5cc3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Ddt/Distribution.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ method !make-content {

method !init-vcs-repo {
my $git-dir = $.main-dir.absolute;
qqx{cd $git-dir && git init}.slurp-rest;
qqx{cd $git-dir && git add .}.slurp-rest;
run(flat(<git init -C>, $git-dir), :out).out.slurp-rest;
run(flat(<git add . -C>, $git-dir), :out).out.slurp-rest;
}


Expand Down
2 changes: 1 addition & 1 deletion lib/Ddt/Plugins/Hack.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ multi MAIN("hack", Str:D $identity, Str $dir?) is export {

my $candi = @local.first;
my IO::Path:D $local-mirror = local-mirror $uri;
say qqx{git clone $uri --reference-if-able $local-mirror.Str() $target};
say run(flat(<git clone>, $uri, <--reference-if-able>, ~$local-mirror, $target), :out).out;
say "Checked out $uri to $target";
say "You can now do `cd $target`";
}
Expand Down

0 comments on commit 9b5cc3f

Please sign in to comment.