I am running flox 0.0.7-r106 and I tried to run flox upgrade:
floxmeta repository (/var/folders/kb/tjt27xcn6_dg095y88337mjm0000gn/T/tmp.IZDetxOz76/102) using deprecated (<=0.0.7) format.
Convert to latest (>=0.0.8) format?
Yes No
then
error: Found argument '{}' which wasn't expected, or isn't valid in this context
Usage: nix-editor [OPTIONS] <FILE> <ATTRIBUTE>
If you want to perform the conversion manually, you could inspect your old environment with EDITOR=cat flox edit, and then you could flox destroy, flox edit, and manually add all your packages (or flox install if you prefer). The new format should have entries of the form packages.nixpkgs-flox.hello = {};
Happy holidays! In the reply-to box, the 7th icon should allow you to upload a file? If not, send it directly to me (I believe you already have my email address) and I’ll get it to Matthew.
Good to know. I was thinking that a simple fix would be to use the non pre-release of flox and remove that line with EDITOR=vim flox edit but this doesn’t seem to edit the file. Could you please tell me if there’s another way to edit it?
The first one tells me that No environment changes detected .. exiting after I edit and the second one failed with a few
response body:
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/commits/commits#get-a-commit"
# This is a prototype profile declarative manifest in TOML format,
}; using cached version
warning: ignoring untrusted substituter 'https://cache.floxdev.com'
warning: error: unable to download 'https://api.github.com/repos/flox/nixpkgs-flox/commits/master': HTTP error 404
and now returns the same thing as the first one.
Maybe I should reinstall flox from the mac installer and then edit?
Another workaround to try (not sure if it will work) would be adding or removing a package at the same time as the alias change to see if that avoids the No environment changes detected bug
Good idea. I tried to change a package during the editing and got:
remote: error: refusing to update checked out branch: refs/heads/x86_64-darwin.default
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote:
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote:
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To /Users/etorreborre/.cache/flox/meta/etorreborre
! [remote rejected] x86_64-darwin.default -> x86_64-darwin.default (branch is currently checked out)
error: failed to push some refs to '/Users/etorreborre/.cache/flox/meta/etorreborre'
Then I tried to add a new generation manually (I’m probably not supposed to do that :-)) and then try to edit with the most recent flox version. That led me to accept the 0.7.0 to 0.8.0 format migration but then I ended up having the same git issue above. Any idea on how to fix that one?
○ flox git status default
Updating /Users/etorreborre/.config/flox/nix.conf
Updating /Users/etorreborre/.config/flox/gitconfig
On branch x86_64-darwin.default
nothing to commit, working tree clean