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

The "file" argument must be of type string. Received type object #69

Open
ghost opened this issue Jul 31, 2020 · 4 comments
Open

The "file" argument must be of type string. Received type object #69

ghost opened this issue Jul 31, 2020 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 31, 2020

    sudoer.spawn(
        'resolvconf -u'
    )
        .catch(err => {
            console.error(err);
        });

Throws this error

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object
    at validateString (internal/validators.js:112:11)
    at normalizeSpawnArguments (child_process.js:407:3)
    at Object.spawn (child_process.js:543:16)

Using

    sudoer.spawn(
        'resolvconf', ['-u']
    )
        .catch(err => {
            console.error(err);
        });

does not solve the problem 🐛

@peterupton
Copy link

This error also affects me, and also happens when using sudoer.exec.

@peterupton
Copy link

Looks like it might have been fixed in this pr: #41

@peterupton
Copy link

I attempted to merge some of the prs myself here: https://github.com/peterupton/electron-sudo

@Paula2001
Copy link

will still facing the issue in 2022

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