cargo-make: @shell script `rm -rf` in windows can not delete file

Describe The Bug

script_runner = "@shell"
script="rm -rf folder file"

in windows will became rmdir, and it can not delete file

To Reproduce

Error Stack

The error stack trace

Code Sample

/// paste code here

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

so if it exists… you end up at: https://github.com/sagiegurari/duckscript/blob/3877712774ae74a6d2d0e0d309954384ce4a7a3e/duckscript_sdk/src/sdk/std/fs/rm/mod.rs#L52

std::fs::remove_file(&arguments[0])

and that breaks? that is so strange. thats a core rust api. so i’m not sure why it would fail. i also have lots of tests there, including on windows. its hard without an ability to debug this.

by the way if you go back to @shell and do rm ./${KERNEL_BIN} it should get translated to del command which you stated is working fine.

i know it ok, but i want to find the error. I just learned about the duck script at today, it’s awesome, i like it