terminalhire 0.40.6 → 0.40.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terminalhire",
3
- "version": "0.40.6",
3
+ "version": "0.40.7",
4
4
  "description": "Local-first job matching for developers — ambient job matches in the Claude Code spinner. Your profile never leaves your machine.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -318,10 +318,14 @@ async function install({ ask: injectedAsk } = {}) {
318
318
  // The `th://` prompt eight steps below in the same flow (jpi-init.js) already
319
319
  // allowlists `'' | y | yes`. Two consecutive consent prompts disagreeing about
320
320
  // which way an unrecognised answer falls is how a regression gets waved through.
321
- const a = String(answer ?? '')
322
- .trim()
323
- .toLowerCase();
324
- const consented = answer !== null && (a === '' || a === 'y' || a === 'yes');
321
+ // Narrow by TYPE, not by listing the non-strings that must not consent. Excluding
322
+ // `null` by value left `undefined` consenting — `String(undefined ?? '')` is also
323
+ // the empty string — so the guard only closed the hole it had already been shown.
324
+ // Both real askers resolve `string | null` today, which is exactly why this must
325
+ // not depend on that: a third `ask` is one refactor away, and it would arrive as
326
+ // the same EOF bug wearing a different value.
327
+ const a = typeof answer === 'string' ? answer.trim().toLowerCase() : null;
328
+ const consented = a === '' || a === 'y' || a === 'yes';
325
329
  if (!consented) {
326
330
  console.log('\nAborted — nothing was changed.');
327
331
  asker.close();