strip trailing whitespace from package command