[BUG] Actions - Renaming directory containing sub-directories deletes folders with spaces

I’m running this action which works fine except the fact that any folders with a space in their name inside the Samples folder will not be committed. 

if [[-d "Samples"]]; then
          git rm -f -r Samples~
          git mv Samples Samples~
          rm -f Samples.meta
          git config --global user.name 'github-bot'
          git config --global user.email 'github-bot@users.noreply.github.com'
          git commit -am "fix: Samples => Samples~"

Very weird to me.

@virsabimunk ,

After moving to " Samples~" directory, you can run the command " ls -R" to check if all the files in " Samples" directory and its sub-directories have been moved successfully. You also can try the mv command (not git mv ) to move the files.

And before executing git commit command, you also can try the git add command.
For example:

git add Samples~
git commit -am "fix: Samples => Samples~"

If the problem still exists, please share your repository with us, so that we can check more detailed configurations of your workflow in the repository to analyze the root cause.

@virsabimunk ,

How are things going? Is my above suggestion helpful to you?

Please try it, and any progress, feel free to tell me.

I’m sorry, it was another third party action that was the culprit.

@virsabimunk ,

Glad that you have found the root cause and solved the problem.

Have a nice day.