Skip to content

Commit

Permalink
Merge pull request #52 from Mic92/syntax-error
Browse files Browse the repository at this point in the history
fix extra parantheses
  • Loading branch information
Mic92 authored Apr 10, 2021
2 parents 2d42179 + ff17ed0 commit 39ef346
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 39ef346

Please sign in to comment.