-
-
Notifications
You must be signed in to change notification settings - Fork 403
arduino-cli uses wrong home directory on MacOS after new install/migration from a time machine backup with home directory name change #1114
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
Comments
The startup code path in arduino-cli reads in ~/Library/Arduino15/arduino-cli.yaml Root cause: This file is copied over by Apple's computer install/migration update process from a backup - even when the home directory names on the two computers are different. Bug: if the contents of this file are wrong, there is no indication in the error messages of what went wrong or how to find, assess and fix it... Suggested fix: Possibilities:
|
Work Around:
|
hi @plocher
extremely good catch! |
I've investigated a bit and we can't solve this because there's nothing to solve really. The CLI is correctly failing in this case, if the paths are not valid is the user's responsability to update them to valid ones. The CLI can't know wether there is a typo in the path or it's malformed in some other way so it just goes along with it and returns an error as soon as it happens. |
@silvanocerza agreed @plocher I hope you'll agree with this |
The bug isn't in what is done (i.e, fails), but in what isn't being done.
The current behavior is as expected, I agree.
The missing piece is the error message.
It needs to be clear that the path in a particular config file is invalid,
and call out both the path and the filename explicitly so that the user can
find and fix the problem.
The user never explicitly edited these files, and (probably? certainly?)
doesn't even know they exist - or where they reside.
Thus, an error message needs to provide actionable context to enable a
manual fix.
The info on the web about arduino-cli is not at all clear on these files
names or exact locations. I only found this level of detail by looking at
the bug reports here :-)
-John
…On Mon, Jan 11, 2021 at 8:12 AM Ubi de Feo ***@***.***> wrote:
@silvanocerza <https://github.com/silvanocerza> agreed
@plocher <https://github.com/plocher> I hope you'll agree with this
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1114 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIIL546YRFXIUEF4NYG5E3SZMPO5ANCNFSM4VKFDVCQ>
.
|
@plocher did you see this section of the Arduino CLI configuration documentation page?: |
The "fix" I'm asking for is simply to add context to the initial error message output, which devotes 7 lines to the WRONG pathname and only one to the place to fix it :-)
INFO[0000] invalid directory path specified in directories.data: /Users/plocher/Library/Arduino15
As an aside, one COULD make the call that |
This makes sense. I can do something like this but I can't point where the path is read from without refactoring a big chunk of code.
Yeah, I wish for that too. The config file handling needs a big refactoring, that takes time to plan and execute it without breaking anything. It's not something that we can work on right now sadly. By the way remember that you must use the |
The directory search order for the config file is supposed to use $HOME...
note the "jplocher"...
Running the command from /Users/jplocher/:
Where is the "/Users/plocher" (without the 'j') coming from?
the "plocher" directory name is not in Apple Preferences/Users, not in /etc/passwd, not in $ENV...
Could it be stored somewhere else that came from a different / previous installation elsewhere where that
home directory name had been used?
The text was updated successfully, but these errors were encountered: