Skip to content

Commit d309637

Browse files
committed
feat: add devtool cargo command
Add command to run any cargo command from inside container without needing to enter it. Signed-off-by: Egor Lazarchuk <[email protected]>
1 parent 2df4fbb commit d309637

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tools/devtool

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,22 @@ cmd_build() {
526526
return $ret
527527
}
528528

529+
cmd_cargo() {
530+
# Check prerequisites
531+
ensure_devctr
532+
ensure_build_dir
533+
534+
run_devctr \
535+
--privileged \
536+
--workdir "$CTR_FC_ROOT_DIR" \
537+
-- \
538+
cargo $@
539+
540+
# Running as root would have created some root-owned files under the build
541+
# dir. Let's fix that.
542+
cmd_fix_perms
543+
}
544+
529545
function cmd_make_release {
530546
ensure_build_dir
531547
run_devctr \

0 commit comments

Comments
 (0)