Skip to content

Commit

Permalink
Add "-rf" for rm to ignore file not found error
Browse files Browse the repository at this point in the history
Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
  • Loading branch information
AristoChen committed Jul 13, 2024
1 parent 011dd11 commit f6b0272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snapcraft_legacy/plugins/v2/_kernel_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def _arrange_install_dir_cmd(install_dir: str) -> List[str]:
# but snapd expects modules/ and firmware/
mv {install_dir}/lib/modules {install_dir}/
# remove symlinks modules/*/build and modules/*/source
rm {install_dir}/modules/*/build {install_dir}/modules/*/source
rm -rf {install_dir}/modules/*/build {install_dir}/modules/*/source
# if there is firmware dir, move it to snap root
# this could have been from stage packages or from kernel build
[ -d {install_dir}/lib/firmware ] && mv {install_dir}/lib/firmware {install_dir}
Expand Down

0 comments on commit f6b0272

Please sign in to comment.