Closed cdwmhcc closed 3 years ago
In order to use *
you must use bash, like this: run(bash: "rm -rf /xxx/swift\ shell/*")
. Be careful with that command though, it deletes everything in that folder.
In order to use
*
you must use bash, like this:run(bash: "rm -rf /xxx/swift\ shell/*")
. Be careful with that command though, it deletes everything in that folder.
Thanks for your help.
I tried it and it didn't work. I now use a for loop to generate relative paths and it works.
Use:
If there are spaces in the path, use single quotes to wrap the constant
let all:Bool = true
runAsync(bash: "rm '\(path)'\(all ? "/*" : "")")
is working
run("rm", "-rf", "/xxx/swift shell/a.txt")
is working, Butrun("rm", "-rf", "/xxx/swift shell/*")
it does not workwhat should I do?