Spot the bug in the copy helper

from Shell basics
GNU Bash 5.2.21 intermediate 6 min 3 issues to find

Find the argument-boundary and injection bugs in this generated copy helper.

Shell
copy_project() {
  source_dir=$1
  backup_dir=$2
  command="cp -R $source_dir $backup_dir"
  printf 'running: %s\n' "$command"
  eval "$command"
}

copy_project "$1" "$2"
Open in playground
Report an error