fix(cli): plain secrets might be undefined

This commit is contained in:
Ruben Fiszel
2023-03-28 23:32:41 +02:00
parent 5d53967ba4
commit 569a55e45b
3 changed files with 6 additions and 5 deletions
@@ -454,6 +454,7 @@ import os
import wmill
from zanzibar.estonie import talin
import matplotlib.pyplot as plt
from . import tests
def main():
pass
+2 -2
View File
@@ -5,7 +5,7 @@ import { Workspace } from "./workspace.ts";
export async function downloadZip(
workspace: Workspace,
plainWorkspace: boolean
plainSecrets: boolean | undefined
): Promise<JSZip | undefined> {
const requestHeaders: HeadersInit = new Headers();
requestHeaders.set("Authorization", "Bearer " + workspace.token);
@@ -16,7 +16,7 @@ export async function downloadZip(
"api/w/" +
workspace.workspaceId +
"/workspaces/tarball?archive_type=zip&plain_secret=" +
plainWorkspace,
(plainSecrets ?? false),
{
headers: requestHeaders,
method: "GET",
+3 -3
View File
@@ -259,7 +259,7 @@ async function pull(
raw: boolean;
yes: boolean;
failConflicts: boolean;
plainSecrets: boolean;
plainSecrets?: boolean;
}
) {
if (!opts.raw) {
@@ -502,7 +502,7 @@ async function push(
yes: boolean;
skipPull: boolean;
failConflicts: boolean;
plainSecrets: boolean;
plainSecrets?: boolean;
}
) {
if (!opts.raw) {
@@ -715,7 +715,7 @@ async function push(
| ResourceTypeFile
| FolderFile,
diffs: Difference[],
plainSecrets: boolean
plainSecrets?: boolean
) {
if (file instanceof ScriptFile) {
throw new Error(