Skip to content

Tools: Additional fix for ubuntu prereq script $PATH whitespace bug #30704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2025

Conversation

avenstewart
Copy link
Contributor

Update for initial fix #30582 for bug #30477. Initial fix partially handled whitespace except during optional tool installs, wherein bug would still cause malformed $PATH to break Ubuntu PAM login.

@avenstewart avenstewart force-pushed the prereq-install-ubuntu-fix branch from 3876afc to 6070db4 Compare July 21, 2025 00:37
@avenstewart avenstewart force-pushed the prereq-install-ubuntu-fix branch from 9e7f6bf to 2375560 Compare July 21, 2025 15:18
else
echo "Skipping adding $OPT/$ARM_ROOT/bin to PATH."
fi
}
fi

exportline2="export PATH=$ARDUPILOT_ROOT/$ARDUPILOT_TOOLS:\$PATH";
exportline2="export \"PATH=$ARDUPILOT_ROOT/$ARDUPILOT_TOOLS:\$PATH\"";
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work correctly?

Shouldn't this be

Suggested change
exportline2="export \"PATH=$ARDUPILOT_ROOT/$ARDUPILOT_TOOLS:\$PATH\"";
exportline2="export PATH=\"$ARDUPILOT_ROOT/$ARDUPILOT_TOOLS:\$PATH\"";

?

Similarly on other lines in here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, i've tested it extensively. Linter throws a warning about backslashes, but there was no cleaner solution I could find.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated with your suggestion

@peterbarker peterbarker force-pushed the prereq-install-ubuntu-fix branch from 3d4f700 to 7158045 Compare July 27, 2025 23:48
@peterbarker peterbarker merged commit 963bca7 into ArduPilot:master Jul 28, 2025
16 checks passed
@peterbarker
Copy link
Contributor

Merged, thanks!

.... but I do suggest you avoid spaces in your paths anyway :-)

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