Skip to content

Conversation

@AlReka
Copy link

@AlReka AlReka commented May 19, 2023

#310 (comment)


Note

Insert cd ".." before MS_exec_cleanup so the script returns to the parent directory prior to cleanup and exit.

Written by Cursor Bugbot for commit 53acbf2. This will update automatically on new commits. Configure here.

@realtime-neil
Copy link
Contributor

realtime-neil commented May 19, 2023

That's not the "previous" directory. That's the parent directory.

You can change to the previous directory by

cd -
-

When a <hyphen-minus> is used as the operand, this shall be equivalent to the command:

    cd "$OLDPWD" && pwd

which changes to the previous working directory and then writes its name.

-- https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html

@megastep
Copy link
Owner

It might be a good idea to add a unit test for the cleanup script too.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

fi
fi
cd ".."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Cleanup Command Navigates Incorrectly

The cd ".." command added before MS_exec_cleanup aims to return to the previous directory, but it actually navigates to the parent directory. This difference can cause the cleanup process to run from an incorrect location, particularly if $tmpdir isn't a direct child of the original working directory or if $tmpdir is the current directory.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants