Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Check external links in README
run: |
nix develop --command \
lychee README.md
check-external-links

- name: check image label
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Link checker cache
.lycheecache

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ data "aws_ami" "detsys_nixos" {
[private-flakes]: https://docs.determinate.systems/flakehub/private-flakes
[ssm]: https://aws.amazon.com/systems-manager
[sts]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html
[terraform]: https://terraform.io
[terraform]: https://developer.hashicorp.com/terraform
11 changes: 11 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@
default = pkgs.mkShell {
packages = with pkgs; [
lychee
(writeShellApplication {
name = "check-external-links";
runtimeInputs = with pkgs; [ lychee ];
text = ''
lychee \
--cache \
--max-concurrency 2 \ # prevents 429 errors
--verbose \
README.me
'';
})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix two bugs in link-check helper: wrong filename and broken line continuation

  • Uses README.me instead of README.md (will 404).
  • Backslash before an inline # comment (--max-concurrency 2 \ # ...) breaks continuation and can inject a stray arg.

Apply:

-              text = ''
-                lychee \
-                  --cache \
-                  --max-concurrency 2 \ # prevents 429 errors
-                  --verbose \
-                  README.me
-              '';
+              text = ''
+                set -euo pipefail
+                # Keep concurrency low to reduce 429s
+                lychee \
+                  --cache \
+                  --max-concurrency 2 \
+                  --verbose \
+                  README.md
+              '';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
(writeShellApplication {
name = "check-external-links";
runtimeInputs = with pkgs; [ lychee ];
text = ''
lychee \
--cache \
--max-concurrency 2 \ # prevents 429 errors
--verbose \
README.me
'';
})
(writeShellApplication {
name = "check-external-links";
runtimeInputs = with pkgs; [ lychee ];
text = ''
set -euo pipefail
# Keep concurrency low to reduce 429s
lychee \
--cache \
--max-concurrency 2 \
--verbose \
README.md
'';
})
🤖 Prompt for AI Agents
In flake.nix around lines 66 to 76, the link-check helper mistakenly references
README.me (should be README.md) and has a broken line continuation due to an
inline comment following a trailing backslash on the `--max-concurrency 2 \ #
...` line; change the filename to README.md and remove the inline `#` comment
from the same continued line (either move the explanatory comment to its own
line above or remove it) so the backslash properly escapes the newline and no
stray argument is injected.

nixpkgs-fmt
] ++ lib.optionals (builtins.elem system linuxSystems) [
inputs.nixos-amis.packages.${system}.upload-ami
Expand Down
Loading