Skip to content

Commit

Permalink
Fixed single quote
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Aug 20, 2024
1 parent 1f3c9eb commit 29cf274
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
2 changes: 1 addition & 1 deletion nix/fixtures/service-repo/dna/dna.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
manifest_version: "1"
manifest_version: '1'
name: my_dna
integrity:
network_seed: ~
Expand Down
16 changes: 8 additions & 8 deletions nix/fixtures/service-repo/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 11 additions & 14 deletions nix/import-yaml.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,21 @@ let
trimmedValue = lib.strings.trim value;
in
if trimmedValue == "[]" then []
else (if trimmedValue == "~" then null else (let
else if trimmedValue == "~" then null
else (let
m4 = l.match ''"(.*)"'' trimmedValue;
m5 = l.match "\'(.*)\'" trimmedValue;
in
if m4 != null then
l.elemAt m4 0
else
(if (l.match ''[0-9]+'' trimmedValue) != null then
lib.toInt trimmedValue
else (
if l.match "^[\ \t]*$" value != null then null
else (
if trimmedValue == "true" then true
else if trimmedValue == "false" then false
else trimmedValue
)
))
)
);
else if m5 != null then
l.elemAt m5 0
else if l.match ''[0-9]+'' trimmedValue != null then
lib.toInt trimmedValue
else if l.match "^[\ \t]*$" value != null then null
else if trimmedValue == "true" then true
else if trimmedValue == "false" then false
else trimmedValue);
in
if m3 != null
then {
Expand Down

0 comments on commit 29cf274

Please sign in to comment.