cros_choose_profile: normalize the profile dir argument

If $PWD happens to contain a dir with the same name as the profile,
the "isdir" check passes and we use the value as-is.  The point of
the check though is to look for absolute paths to profiles, so run
the argument through realpath all the time.

TEST=`cros_choose_profile --profile=base` works when $PWD has a base dir

Change-Id: I6c9ebea68f0d19c3b840e42eb4e760a69336781d
Commit-Ready: Mike Frysinger <>
Tested-by: Mike Frysinger <>
Reviewed-by: mukesh agrawal <>
1 file changed