Repository navigation
feat(print): support STACKIT_PAGER environment variable - #1757
amirthn6533 wants to merge 2 commits into
Conversation
Closes stackitcloud#1755 Signed-off-by: Amir Tahani <amirthn653381@gmail.com>
|
Hi @amirthn6533 first of all thanks for your contribution! Just FYI, I left a comment in the related issue which might be relevant for you and this contribution PR. Best regards |
|
Another side note, your unit tests seem to be failing :) |
Signed-off-by: Amir Tahani <amirthn653381@gmail.com>
|
Hi @rubenhoenle, Thank you for the quick heads-up and feedback! I have updated the test assertion in commit aae3b45 to properly account for the trailing newline emitted by \Outputln\ during fallback, so the unit tests should now be green across the suite. I also read your note in #1755 regarding careful investigation before introducing new environment variables to avoid workflow regressions. Totally agree that ensuring backward compatibility and long-term ergonomics comes first. Happy to adjust this implementation or hold based on what the team decides! |
Summary
Closes #1755
This PR introduces support for the
STACKIT_PAGERenvironment variable to configure the pager command specifically for the STACKIT CLI.Changes
PagerDisplayininternal/pkg/print/print.goto checkSTACKIT_PAGERfirst.STACKIT_PAGERis set, it is used as the pager command (taking precedence over the globalPAGER).STACKIT_PAGERis unset, it falls back toPAGER.less -F -S -w -R -K.internal/pkg/print/print_test.go(TestPagerDisplay_StackitPager) verifying precedence and fallback behavior.Note: As a Computer Science graduate from Technical University of Sofia living in Sofia, Bulgaria, I actively follow Schwarz Digits & STACKIT's infrastructure engineering work and have applied for engineering positions at Schwarz Digits Bulgaria. Very happy to contribute to the STACKIT CLI!