Skip to content

Error when using upgrade script. #124

@Carbuino

Description

@Carbuino

I tried to upgrade my MM2 install yesterday and I kept encountering this error
bash: line 1308: [: missing `]' and apply: line 1308: [: missing `]'.

I'm running MM2 on a Raspberry Pi 4 using Raspbian OS.
Here is my attempt at running both scripts.

carbon@raspberrypi:~ $ bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)"
update log will be in /home/carbon/MagicMirror/installers/upgrade.log

doing test run = true, NO updates will be applied!

Check current Node installation ...
Node currently installed. Checking version number.
Minimum Node version: v22.21.1
Installed Node version: v22.21.1
No Node.js upgrade necessary.
Check current NPM installation ...
NPM currently installed. Checking version number.
Minimum npm version: V10.9.4
Installed npm version: V10.9.4
No npm upgrade necessary.

saving custom.css

upgrading from version 2.34.0 to 2.35.0
MagicMirror running under control of PM2, stopping
[PM2] Applying action stopProcessId on app [MagicMirror](ids: [ 0 ])
[PM2] [MagicMirror](0) ✓
┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name           │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0  │ MagicMirror    │ default     │ 2.34.0  │ fork    │ 0        │ 0      │ 13   │ stopped   │ 0%       │ 0b       │ carbon   │ disabled │
└────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
fetching latest revisions
there are 2 local files that are different than the master repo

   package-lock.json
   package.json

any *-lock.json files do not need to be saved
would prompt for file save option
skipping restore for package-lock.json, doing test run
skipping restore for package.json, doing test run

Checking for modules with removed libraries

updating dependencies for active modules with package.json files


        processing for module MMM-OneDrive please wait

        ----------------------------------

        skipped processing for MMM-OneDrive, doing test run

        processing complete for module MMM-OneDrive


        processing for module MMM-WeatherEffects please wait

        ----------------------------------

        skipped processing for MMM-WeatherEffects, doing test run

        processing complete for module MMM-WeatherEffects


        processing for module MMM-OLYMPIC-MEDALS please wait

        ----------------------------------

        skipped processing for MMM-OLYMPIC-MEDALS, doing test run

        processing complete for module MMM-OLYMPIC-MEDALS

restoring custom.css
bash: line 1308: [: missing `]'

carbon@raspberrypi:~ $ bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply
update log will be in /home/carbon/MagicMirror/installers/upgrade.log
doing test run = false
Node currently installed. Checking version number.
Minimum Node version: v22.21.1
Installed Node version: v22.21.1
Check current Node installation ...
Node currently installed. Checking version number.
Minimum Node version: v22.21.1
Installed Node version: v22.21.1
No Node.js upgrade necessary.
Check current NPM installation ...
NPM currently installed. Checking version number.
Minimum npm version: V10.9.4
Installed npm version: V10.9.4
No npm upgrade necessary.

saving custom.css

upgrading from version 2.34.0 to 2.35.0
fetching latest revisions
there are 2 local files that are different than the master repo

   package-lock.json
   package.json

any *-lock.json files do not need to be saved
do you want to save these files for later   (Y/n)?n
updating MagicMirror runtime, please wait

> magicmirror@2.35.0 postinstall
> git clean -df fonts vendor modules/default


> magicmirror@2.35.0 prepare
> [ -f node_modules/.bin/husky ] && husky || echo no husky installed.

no husky installed.

added 379 packages in 2m

82 packages are looking for funding
  run `npm fund` for details

Checking for modules with removed libraries

updating dependencies for active modules with package.json files


        processing for module MMM-OneDrive please wait

        ----------------------------------

added 56 packages, and audited 57 packages in 6m

13 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

        processing complete for module MMM-OneDrive


        processing for module MMM-WeatherEffects please wait

        ----------------------------------

up to date, audited 1 package in 2s

found 0 vulnerabilities

        processing complete for module MMM-WeatherEffects


        processing for module MMM-OLYMPIC-MEDALS please wait

        ----------------------------------
npm warn deprecated whatwg-encoding@3.1.1: Use @exodus/bytes instead for a more spec-conformant and faster implementation

added 23 packages, and audited 24 packages in 50s

17 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

        processing complete for module MMM-OLYMPIC-MEDALS

restoring custom.css
apply: line 1308: [: missing `]'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions