Skip to content

Conversation

@alexxroche
Copy link

test with zero files

test with zero files
Copy link
Owner

@bahamas10 bahamas10 left a comment

Choose a reason for hiding this comment

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

hello! thank you for the code change I appreciate it - and I agree that running this when the total len is 0 is very confusing so this change fixes that.

I have one style nit before I merge this - if you're curious about the style i prefer I've outlined it all here: https://style.ysap.sh

local current=$1
local len=$2
# if len is zero, fail gracefully
[ ! "$len" ]||[ "$len" -le 0 ]&& return
Copy link
Owner

Choose a reason for hiding this comment

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

style nit: use (( ... )) for arithmetic expressions - please change this to:

if ((len == 0)); then
  return
fi

Or if you'd still like it all on one line I'm ok with:

((len == 0)) && return

@bahamas10
Copy link
Owner

closing this due to inactivity - feel free to re-open if you'd like to get this change merged with the style changes made.

@bahamas10 bahamas10 closed this Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants