Skip to content

Commit

Permalink
fix extra parantheses
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Apr 9, 2021
1 parent 926bf0d commit ff17ed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nix_update/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ def nix_prefetch(cmd: List[str]) -> str:


def disable_check_meta(opts: Options) -> str:
return f'(if (builtins.hasAttr "config" (builtins.functionArgs (import {opts.import_path}))) then {{ config.checkMeta = false; }} else {{ }}))'
return f'(if (builtins.hasAttr "config" (builtins.functionArgs (import {opts.import_path}))) then {{ config.checkMeta = false; }} else {{ }})'


def update_src_hash(opts: Options, filename: str, current_hash: str) -> None:
expr = f"(import {opts.import_path} {disable_check_meta(opts)}.{opts.attribute}"
expr = f"(import {opts.import_path} {disable_check_meta(opts)}).{opts.attribute}"
target_hash = nix_prefetch([expr])
replace_hash(filename, current_hash, target_hash)

Expand Down

0 comments on commit ff17ed0

Please sign in to comment.