Closed rh0dy closed 2 months ago
This is a know limitation of the shell plugins API: the app you are trying to provision must only read once from the provisioning file. If it reads 2 times, or attempts to write to the file then the provisioning will hang forever.
Background: We're using FIFO as a file abstraction to write secrets in order to provision to apps. FIFOs can only be read when they are open for write and when are only writing once to the FIFO in op . So when the app we provision reads a second time, or attempts to write to the FIFO then it will wait for the counterpart operation that comes from op , Just that op never responds.Ideally we could determine in advance what operations the app executes so op could respond appropriately for each. Unfortunately this is not possible unless we expose something in the Shell Plugins api to allow each app to define what the app reads and writes from the provisioning file.
Thanks for the heads up about this @AndyTitu, will take a look at what our app is doing!
Hey, I'm after a bit of help please? I use a local dev CLI tool called
fooctl
, it simplifies my interactions with cloud resources. To usefooctl
, I must provide a credentials file at~/.fooctl/credentials
. The credentials file expects aUUID
andToken
(I guess in theini
format, e.g.UUID = "4191234b-foo5-4bar-af3f-3d8266111d8b"
).I followed the tutorial, but I'm getting stuck - literally.
My plugin validates & builds fine. It's also successfully looking for & importing the
UUID
andToken
in 1Password when a credentials file already exists.However, it hangs when using any
fooctl
commands with an arg.I'm running this on macOS
14.4.1 (23E224)
from~/dev/shell-plugins
.This is what happens when I run
footctl
without any args, works as expected:Now to use
fooctl
, I need to use thedaemon
command (which requires the credentials file):Interestingly, if I run
fooctl configure
(I thought I could avoid doing this as this is what the shell plugin creates), it gets a bit further. It creates the credentials file which I can open & see correct contents... but then hangs:Can you spot anything wrong in the code, or suggest ways to troubleshoot this?