Skip to content

Tinyexec 1.2.3 breaks lint-staged tests on Ubuntu #139

Description

@iiroj

Hello, upgrading lint-staged to use tinyexec@^1.2.3 is causing failures of tests in GitHub Actions running on ubuntu-latest on Node.js versions 22.2.1, 24.x and 26.x. Windows and macOS tests do pass.

Here's the related Pull Request on updates: lint-staged/lint-staged#1802

The single failing test is related to searching for configuration files, and tinyexec is used to spawn Git to list some files:

Details
exec('git', ['ls-files',
  '-z',
  '--full-name',
  '-t',
  '--cached',
  '--others',
  '--exclude-standard',
  '--',
  ':(glob)**/package.json',
  ':(glob)**/package.yaml',
  ':(glob)**/package.yml',
  ':(glob)**/.lintstagedrc',
  ':(glob)**/.lintstagedrc.json',
  ':(glob)**/.lintstagedrc.yaml',
  ':(glob)**/.lintstagedrc.yml',
  ':(glob)**/.lintstagedrc.mjs',
  ':(glob)**/.lintstagedrc.mts',
  ':(glob)**/.lintstagedrc.js',
  ':(glob)**/.lintstagedrc.ts',
  ':(glob)**/.lintstagedrc.cjs',
  ':(glob)**/.lintstagedrc.cts',
  ':(glob)**/lint-staged.config.mjs',
  ':(glob)**/lint-staged.config.mts',
  ':(glob)**/lint-staged.config.js',
  ':(glob)**/lint-staged.config.ts',
  ':(glob)**/lint-staged.config.cjs',
  ':(glob)**/lint-staged.config.cts'
])

With tinyexec 1.2.3 the command must be producing no output, which makes the test fail. Previous version 1.2.2 works ok.

I assume it's related to the destroying of streams on 'exit' introduced in #137

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions