Giter Club home page Giter Club logo

urlswitcher-deno's People

Contributors

kbenson avatar

Stargazers

 avatar

Watchers

 avatar  avatar

urlswitcher-deno's Issues

Misleading error if browser path given in quotes in .ini

When running the compiled application I was seeing a very brief terminal window flash and no browser would launch. Running by hand produced the following output. Note the use of --allow-all to rule out any permissions issues from deno itself. This is Windows saying no.

C:\Users\username\Downloads\urlswitcher-deno-main\urlswitcher-deno-main> deno run --allow-all .\main.ts https://www.google.com
Testing match /://..example.com/
Testing match regexp(://.
.example.net)
firefox work
[ '"C:\Program Files\Mozilla Firefox\firefox.exe"', "https://www.google.com" ]
error: Uncaught PermissionDenied: Access is denied. (os error 5)
const r = Deno.run({ cmd: commandAry });
^
at Object.opSync (deno:core/01_core.js:149:12)
at opRun (deno:runtime/js/40_process.js:27:17)
at Object.run (deno:runtime/js/40_process.js:114:17)
at file:///C:/Users/username/Downloads/urlswitcher-deno-main/urlswitcher-deno-main/main.ts:101:16

When writing out .urlswitcher.ini the unbounded spaces in the file bothered me so I put them in quotes:

# urlswitch.ini
[default]
browser = firefox work

[firefox work]
command = "C:\Program Files\Mozilla Firefox\firefox.exe"
match[] = regexp(://.*\.example.com)
match[] = regexp(://.*\example.net)

[chrome personal]
command = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"

Removing the quotes removed the error and solved the problem. Might be worth adding a comment line in the example file warning against this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.