question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow plugin directories to be optional

See original GitHub issue

Using gluegun@2.0.0-alpha.2, I have this in my runtime config:

    .plugin(resolve(`${filesystem.cwd()}`, BRAND), LOAD_OPTIONS)

But I want that to be optional as it may not exist.

Here’s the error it spits out:

Error: Error: couldn't load plugin (not a directory): /Users/steve/src/ir/app-machine/app-machine
    at loadFromDirectory (/Users/steve/src/ir/app-machine/node_modules/gluegun/src/loaders/toml-plugin-loader.js:40:11)
    at Runtime.load (/Users/steve/src/ir/app-machine/node_modules/gluegun/src/domain/runtime.js:184:20)
    at loadPlugins.forEach.entry (/Users/steve/src/ir/app-machine/node_modules/gluegun/src/domain/builder.js:56:19)
    at Array.forEach (<anonymous>)
    at Builder.create (/Users/steve/src/ir/app-machine/node_modules/gluegun/src/domain/builder.js:50:22)
    at Object.configureRuntime (/Users/steve/src/ir/app-machine/src/cli/gluegun-runtime.ts:20:6)
    at Object.<anonymous> (/Users/steve/src/ir/app-machine/src/cli/cli.ts:24:21)
    at step (/Users/steve/src/ir/app-machine/src/cli/cli.ts:32:23)
    at Object.next (/Users/steve/src/ir/app-machine/src/cli/cli.ts:13:53)
    at /Users/steve/src/ir/app-machine/src/cli/cli.ts:7:71

For src I can see why it’s required, but for plugin and plugins, it should be optional.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
skellockcommented, Oct 17, 2017

Sure! I was thinking of options having an extra property called required which wouldn’t be there (so falsy) by default. But in loadDefault, it would be required: true.

I think. Haha.

1reaction
WilliamStephenscommented, Oct 17, 2017

Hey, I would love to take this one!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to set a flag or an option to allow plugin to write to ...
I found a PluginPermission struct with no description. It has factory method writeToPackageDirectory, but It is unclear how to use it.
Read more >
Optional Plugins - Apache SkyWalking
Optional Plugins. Java agent plugins are all pluggable. Optional plugins could be provided in optional-plugins folder under agent or 3rd party repositories.
Read more >
plugin system - how to load vim8 optional packages in vimrc?
The way to load vim8 optional packages in your vimrc is to use the :packadd! command, which will add them to your 'runtimepath'...
Read more >
Allowing anonymous users to edit listing - WordPress.org
Hi, I'm using the free version of your plugin. The directory itself ... You can find this option by going to Directory >...
Read more >
4.4.4 mysql_plugin — Configure MySQL Server Plugins
Depending on whether mysql_plugin is invoked to enable or disable plugins, ... this option is not given, the default is plugin .ini in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found