Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to configure secret yield an "Raw mode not supported" from vadimdemdes/ink package #170

Closed
Tracked by #12
grenierdev opened this issue Dec 26, 2021 · 1 comment · Fixed by #559 or #562
Closed
Tracked by #12
Assignees

Comments

@grenierdev
Copy link

Today I was trying to configure my first secret variable with echo "SECRET VALUE" | wrangler secret put SECRET_KEY and I was getting the following error :

  ERROR  Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
        Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported

 - Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported

The command works with wrangler1.

Tested on Win10 Pro 19043.1415, node v16.9.0, npm v7.21.1, wrangler 0.0.6 and 1.19.6.

@petebacondarwin
Copy link
Contributor

Thanks for submitting this issue report @grenierdev.

Wrangler2 does not currently support piping values into the CLI.

I think we need to intercept the situation where stdin is not in TTY mode and avoid sending processing to Ink components...

@threepointone threepointone mentioned this issue Jan 7, 2022
27 tasks
@petebacondarwin petebacondarwin added this to the Wrangler 2.0 milestone Feb 1, 2022
@Electroid Electroid assigned caass and petebacondarwin and unassigned caass Mar 7, 2022
petebacondarwin added a commit to petebacondarwin/wrangler2 that referenced this issue Mar 8, 2022
Now the user can pipe in the secret value to the `wrangler secret put` command.
For example:

```
cat my-secret.txt | wrangler secret put secret-key --name worker-name
```

This requires that the user is logged in, and has only one account;
Or if the user has multiple accounts, it must be specified via the `CLOUDFLARE_ACCOUNT_ID` environment variable.

Fixes cloudflare#170
petebacondarwin added a commit to petebacondarwin/wrangler2 that referenced this issue Mar 9, 2022
Now the user can pipe in the secret value to the `wrangler secret put` command.
For example:

```
cat my-secret.txt | wrangler secret put secret-key --name worker-name
```

This requires that the user is logged in, and has only one account;
Or if the user has multiple accounts, it must be specified via the `CLOUDFLARE_ACCOUNT_ID` environment variable.

Fixes cloudflare#170
petebacondarwin added a commit to petebacondarwin/wrangler2 that referenced this issue Mar 9, 2022
Now the user can pipe in the secret value to the `wrangler secret put` command.
For example:

```
cat my-secret.txt | wrangler secret put secret-key --name worker-name
```

This requires that the user is logged in, and has only one account;
Or if the user has multiple accounts, it must be specified via the `CLOUDFLARE_ACCOUNT_ID` environment variable.

Fixes cloudflare#170
petebacondarwin added a commit to petebacondarwin/wrangler2 that referenced this issue Mar 9, 2022
Now the user can pipe in the secret value to the `wrangler secret put` command.
For example:

```
cat my-secret.txt | wrangler secret put secret-key --name worker-name
```

This requires that the user is logged in, and has only one account;
Or if the user has multiple accounts, it must be specified via the `CLOUDFLARE_ACCOUNT_ID` environment variable.
For example:

```
CLOUDFLARE_ACCOUNT_ID=some-account-id cat my-secret.txt | wrangler secret put secret-key --name worker-name
```

Fixes cloudflare#170
petebacondarwin added a commit to petebacondarwin/wrangler2 that referenced this issue Mar 9, 2022
Now the user can pipe in the secret value to the `wrangler secret put` command.
For example:

```
cat my-secret.txt | wrangler secret put secret-key --name worker-name
```

This requires that the user is logged in, and has only one account;
Or if the user has multiple accounts, it must be specified via the `CLOUDFLARE_ACCOUNT_ID` environment variable.
For example:

```
CLOUDFLARE_ACCOUNT_ID=some-account-id cat my-secret.txt | wrangler secret put secret-key --name worker-name
```

Fixes cloudflare#170
petebacondarwin added a commit to petebacondarwin/wrangler2 that referenced this issue Mar 9, 2022
Now the user can pipe in the secret value to the `wrangler secret put` command.
For example:

```
cat my-secret.txt | wrangler secret put secret-key --name worker-name
```

This requires that the user is logged in, and has only one account, or that the `account_id` has been set in `wrangler.toml`.

Fixes cloudflare#170
petebacondarwin added a commit that referenced this issue Mar 9, 2022
* feat: support adding secrets in non-interactive mode

Now the user can pipe in the secret value to the `wrangler secret put` command.
For example:

```
cat my-secret.txt | wrangler secret put secret-key --name worker-name
```

This requires that the user is logged in, and has only one account, or that the `account_id` has been set in `wrangler.toml`.

Fixes #170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
3 participants