From 043e6282e412bacd5ffd86dd41de61208681d911 Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Sun, 9 Aug 2026 18:37:35 -0700 Subject: [PATCH] Merge nucleic/nimble-iris-toad-cpro into dev --- LICENSE | 21 +++++++++++++++++++++ nash/creds.txt | 1 - nash/tests/observe.rs | 11 +++++++++-- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 LICENSE delete mode 100644 nash/creds.txt diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..716ec58 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Andrew Blakeslee Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/nash/creds.txt b/nash/creds.txt deleted file mode 100644 index bb8a8b6..0000000 --- a/nash/creds.txt +++ /dev/null @@ -1 +0,0 @@ -export TOKEN=ghp_ABCDEFGHIJKLMNOP1234567890abcd diff --git a/nash/tests/observe.rs b/nash/tests/observe.rs index 0d7776f..a664f28 100644 --- a/nash/tests/observe.rs +++ b/nash/tests/observe.rs @@ -515,10 +515,16 @@ fn cmdsub_output_captured() { #[test] fn credential_shapes_redacted_in_previews() { let sink = Sink::start(); - let status = run_nash( + // Write into a scratch cwd so a leftover creds.txt never lands in the source tree + // (a prior revision of this test committed one). + let parent = scratch_dir("nash-creds"); + let status = nash_command( &sink, "echo 'export TOKEN=ghp_ABCDEFGHIJKLMNOP1234567890abcd' > creds.txt", - ); + ) + .current_dir(&parent) + .status() + .unwrap(); assert_eq!(status.code(), Some(0)); let events = sink.events_until(|evs| evs.iter().any(|e| e["kind"] == "redirect")); let r = events.iter().find(|e| e["kind"] == "redirect").expect("redirect"); @@ -527,6 +533,7 @@ fn credential_shapes_redacted_in_previews() { assert!(preview.contains("«redacted»"), "expected redaction marker: {preview:?}"); // The byte count still reflects the real (unredacted) length on disk. assert_eq!(r["bytes"], 48); + let _ = std::fs::remove_dir_all(&parent); } #[test]