-
Notifications
You must be signed in to change notification settings - Fork 352
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
Wrong state.json
is being used
#1160
Comments
It seems like the only place retrieving Lines 17 to 25 in f88b460
So, it looks like the situation above would happen for any user who has a @erezrokah What are your thoughts on this issue? |
Thanks @ehmicky for looking into it. |
Yes, I agree. When a user is running a The current code is assuming that there is always a valid Several possible solutions:
What do you think? |
We can divide the logic:
|
This was initially reported by @biilmann.
He created a completely fresh project with just a
public
folder, afunctions
folder and anetlify.toml
file and then did anetlify deploy --prod
and instead of creating a new site or prompting for an existing one, it deployed to the last project he worked on and overwrote the product deploy there.It seems the CLI is writing the site
state.json
to the.netlify
folder in my home directory instead of in the site specific directory.He is not sure how he got into that state because it is so hard to debug. For some reason, setting up a project ended up writing to his home directory instead of the project dir, and then any new project travels up and finds that state file.
Once he deleted that file things go back to working as expected.
The text was updated successfully, but these errors were encountered: