Skip to content

Commit 44f6664

Browse files
authored
Merge pull request #135 from a8cteam51/fix/op-1password-stdin-quoting
Fix 1Password writes failing with "invalid JSON in piped input"
2 parents 9db2636 + 20f7bdb commit 44f6664

13 files changed

Lines changed: 824 additions & 536 deletions

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Be well, be kind, make things and set them free.
3131
1. Ensure you have OpsOasis access. Details: p4Kr4c-dgn-p2#setting-up-opsoasis-1password (Not familiar with the link? Check the Field Guide for "Public GitHub Repository Shorthand".)
3232
1. Open the Terminal on your Mac and install [Homebrew](https://brew.sh/) (if you haven't already).
3333
- `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
34-
1. Ensure that you are running PHP8.2+ in your terminal by running `php -v` and cross-checking the outputted version; We actually recommend running the latest version of PHP. If you’re not, then run `brew install php@8.3 brew-php-switcher` followed by `brew link php@8.3`
34+
1. Ensure that you are running PHP 8.3+ in your terminal by running `php -v` and cross-checking the outputted version; We actually recommend running the latest version of PHP. If you’re not, then run `brew install php@8.3 brew-php-switcher` followed by `brew link php@8.3`
3535
1. Keep your Terminal open and clone this repository by running:
3636
- `git clone git@github.com:a8cteam51/team51-cli.git`
3737
- The Terminal will ask you for a so-called SSH Passphrase which you must type and hit `Enter` (if you're unsure what the passphrase is, try entering the same you'd use for the AutoProxxy).
@@ -189,12 +189,11 @@ If you get the error `./install-osx: line 2: composer: command not found`, you c
189189

190190
If you don't have [brew](https://brew.sh/) yet, install it by executing this from your Terminal: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` — Tip: you can use brew to install all sort of apps on your Mac. Give it [a try](https://formulae.brew.sh/cask/zoom)
191191

192-
193192
### `env: php: No such file or directory`
194193

195-
This is likely because you don't have PHP installed on your system. If you recently updated to MacOS Monterey, that could be the culprit as it doesn't come bundled with PHP anymore. If you have `brew` installed, it's easy to get PHP added by running the following command in the terminal: `brew install php@8.2 brew-php-switcher`. This will install the latest version of PHP 8.2 as well as a handy utility for switching between PHP versions if you need to.
194+
This is likely because you don't have PHP installed on your system. If you recently updated to MacOS Monterey, that could be the culprit as it doesn't come bundled with PHP anymore. If you have `brew` installed, it's easy to get PHP added by running the following command in the terminal: `brew install php@8.3 brew-php-switcher`. This will install the latest version of PHP 8.3 as well as a handy utility for switching between PHP versions if you need to.
196195

197-
You will then need to run `brew link php@8.2` so that PHP gets symlinked properly to your system's PHP files. Running `team51` now should work just fine.
196+
You will then need to run `brew link php@8.3` so that PHP gets symlinked properly to your system's PHP files. Running `team51` now should work just fine.
198197

199198
### `git@github.com: Permission denied (publickey)`
200199

commands/GitHub_Checklist_Add.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ final class GitHub_Checklist_Add extends Command {
6969
'question' => 'Has the site previously been hosted on WordPress.com or WordPress VIP?',
7070
'description' => 'The site has previously been hosted on WordPress.com or WordPress VIP.',
7171
),
72-
'site-redesign' => array(
72+
'site-redesign' => array(
7373
'question' => 'Is this a redesign of a site that has an existing/prior T51 repo?',
7474
'description' => 'This site already has a Team 51 GitHub code repository.',
7575
),

commands/WPCOM_Site_WP_User_Password_Rotate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected function execute( InputInterface $input, OutputInterface $output ): in
141141
}
142142

143143
$output->writeln( "<fg=magenta;options=bold>Rotating the WP user password of $this->wp_user_email on $site->name (ID $site->ID, URL $site->URL).</>" );
144-
if ( '242557543' == $site->ID ) { // TODO: Investigate why this site fails and remove this check.
144+
if ( '242557543' === (string) $site->ID ) { // TODO: Investigate why this site fails and remove this check.
145145
$output->writeln( '<error>Skipping site ID 242557543 as it is known to have issues with password rotation.</error>' );
146146
continue;
147147
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
}
77
],
88
"require": {
9+
"php": ">=8.3",
910
"ext-gd": "*",
1011
"ext-json": "*",
1112
"ext-posix": "*",
@@ -56,7 +57,7 @@
5657
"packages-install": "@composer install --ignore-platform-reqs --no-interaction",
5758
"packages-update": [
5859
"@composer clear-cache",
59-
"@composer update --prefer-stable --ignore-platform-reqs --no-interaction"
60+
"@composer update --prefer-stable --ignore-platform-req=ext-* --no-interaction"
6061
]
6162
},
6263
"config": {

0 commit comments

Comments
 (0)