Skip to content

Doesn't work with await #46

Description

@strarsis

@z-vr:

const exiftool = require('node-exiftool'),
      ep       = new exiftool.ExiftoolProcess(),

async function test(inputPath) {
    await ep.open();

    try {
        const result = await ep.readMetadata(
            inputPath,
            ['-File:all -dateFormat %Y-%m-%dT%H:%M:%S -datetimeoriginal']
        );
        console.log(result);
    } catch(e) {
        console.error(e);
    }

    await ep.close();
}

test('./test.jpg');

Error:

UnhandledPromiseRejectionWarning: Error: Exiftool process is not open

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