Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck forever if perl is missing #152

Closed
TdyP opened this issue Jul 25, 2023 · 2 comments
Closed

Stuck forever if perl is missing #152

TdyP opened this issue Jul 25, 2023 · 2 comments

Comments

@TdyP
Copy link

TdyP commented Jul 25, 2023

Is your feature request related to a problem? Please describe.
I'm running this lib in Docker, on an Alpine container with no perl installed.
When calling a simple await exiftool.version() it never responds and get stuck here forever, with no clue about what's happening. Even a try/catch doesn't caught any error.
After installing perl, everything runs smoothly.

Describe the solution you'd like
An explicit failure if it's not able to run a process and the reason if possible (missing perl).

Additional context
I'm not sure whether this package or exiftool-vendored.pl should handle the error about missing perl, but this package should at least be able to detect it couldn't get a process running.

@mceachen
Copy link
Member

I’d be happy to review a pull request to add this: but remember to only check on non-Windows, as that platform doesn’t require an external Perl environment.

@mceachen
Copy link
Member

mceachen commented Sep 4, 2023

$ docker run -it node:alpine sh
/ # yarn add exiftool-vendored
yarn add v1.22.19
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 7 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ @photostructure/[email protected]
├─ @types/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Done in 2.29s.
/ # node
Welcome to Node.js v20.5.1.
Type ".help" for more information.
> require("exiftool-vendored").exiftool.read("/etc/hosts")
Promise {
  <pending>,
  [Symbol(async_id_symbol)]: 240,
  [Symbol(trigger_async_id_symbol)]: 6
}
> Uncaught Error: ExifTool requires perl. Please install perl and try again.

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

No branches or pull requests

2 participants