sindresorhus / open

Open stuff like URLs, files, executables. Cross-platform.
MIT License
3.14k stars 213 forks source link

Fix passed an illegal parameter #316

Closed cweijan closed 1 year ago

cweijan commented 1 year ago

Hi, if I pass parameters to openApp, the program will not recognize it, and it will work normally after removing the extra quotes.

sindresorhus commented 1 year ago

// @tim-stasse

cweijan commented 1 year ago

Hi, I am making this request because I am using mstsc and below is my code.

import { openApp } from 'open';
const params = ['test.rdp','/v','127.0.0.1:3389']
openApp('mstsc.exe', { arguments: params });

When I execute this code, mstsc doesn't work.

image

After I remove the extra quotes, openApp will work fine.