sops: fix setting secret from pipe
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import io
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
@@ -171,7 +172,7 @@ def encrypt_file(
|
|||||||
elif isinstance(content, bytes):
|
elif isinstance(content, bytes):
|
||||||
with open(f.name, "wb") as fd:
|
with open(f.name, "wb") as fd:
|
||||||
fd.write(content)
|
fd.write(content)
|
||||||
elif isinstance(content, IO):
|
elif isinstance(content, io.IOBase):
|
||||||
with open(f.name, "w") as fd:
|
with open(f.name, "w") as fd:
|
||||||
shutil.copyfileobj(content, fd)
|
shutil.copyfileobj(content, fd)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user