Support loading a custom shared library path.#231
Support loading a custom shared library path.#231itzTheMeow wants to merge 3 commits into1Password:betafrom
Conversation
|
Perhaps I could also PR this to the other SDKs if this is approved? |
|
Thank you for the contribution! I like the idea of making the shared library path configurable in the SDKs. However, I'm not convinced is the best way to achieve this. This approach conflicts with one of the design goals we had for the SDKs. Essentially, with this change, every app that uses the SDKs (with the desktop app integration) will start to behave differently depending on the value of an environment variable read by the SDKs ( This is not something a typical developer would expect of an SDK. In my opinion, a better way to make this configurable would be to let integration developers opt into this behavior explicitly, e.g. by using a custom configuration function: onepassword.NewClient(context.Background(),
onepassword.WithDesktopAppIntegration("YourAccountName"),
onepassword.WithCustomDesktopAppPath("/my/custom/path/"),
)I think we can achieve this by adding a new field to the config and passing it into the What do you think, @AndyTitu ? |
|
I agree with the above comment. Moreover, we should make sure this change is consistent across all SDKs (including python and JS). |
|
I changed this to add a |
|
Since the structure has changed, would it make sense to put the |
|
+1 on this! I'm waiting for this merge so I can add support to the TF provider. I have this work-aroundin my system configuration to make the TF provider work on NixOS. I'd like to be able to remove that so I don't have anything required to work on my project outside of the development shell. |
Adds an environment variableOP_SHARED_LIB_PATHto support loading a custom shared library file location.Adds a
WithSharedLibraryPathoption to support loading a custom shared library file location.This is useful for sandboxed contexts (such as nix) which don't have access to the /opt/1Password (or other) directory and must copy the library into the sandbox.
Related SDK PRs: