nix-community / nixos-vscode-server

Visual Studio Code Server support in NixOS
MIT License
419 stars 76 forks source link

Fix condition for patching #51

Closed K900 closed 1 year ago

K900 commented 1 year ago

This was inverted.

msteen commented 1 year ago

It is actually as intended. The comment above it is outdated though.

If the file does not exist. Exit. It should exist, so something clearly went wrong beforehand. Else if the file does exist (i.e. not not exists) and contains a 1, it is already patched. Exit.

K900 commented 1 year ago

This script creates the file though? With the current state of things, it will never actually get created.

msteen commented 1 year ago

The patching is done in potentially 2 steps, the first step is replacing node, the second is patching any binaries if FHS isn't used. The first already creates this file, so we know the first step has already been done: https://github.com/msteen/nixos-vscode-server/blob/57f1716bc625d2892579294cc207956679e3d94c/pkgs/auto-fix-vscode-server.nix#L132