juliusknorr / nextcloud-docker-dev

Nextcloud development environment using docker-compose
GNU Affero General Public License v3.0
139 stars 74 forks source link

./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable #306

Closed autoantwort closed 8 months ago

autoantwort commented 8 months ago

When I execute the following commands on my computer I get the following error:

git clone https://github.com/juliushaertl/nextcloud-docker-dev
cd nextcloud-docker-dev
./bootstrap.sh
./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable
    🌏 Fetching viewer
    ❌ Failed to install viewer
./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable
    🌏 Fetching recommendations
    ❌ Failed to install recommendations
./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable
    🌏 Fetching files_pdfviewer
    ❌ Failed to install files_pdfviewer
./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable
    🌏 Fetching profiler
    ❌ Failed to install profiler
./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable
    🌏 Fetching hmr_enabler
    ❌ Failed to install hmr_enabler
./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable
    🌏 Fetching circles
    ❌ Failed to install circles
Full Output

``` ➜ git_projekte git clone https://github.com/juliushaertl/nextcloud-docker-dev cd nextcloud-docker-dev ./bootstrap.sh Cloning into 'nextcloud-docker-dev'... remote: Enumerating objects: 2901, done. remote: Counting objects: 100% (875/875), done. remote: Compressing objects: 100% (231/231), done. remote: Total 2901 (delta 702), reused 736 (delta 641), pack-reused 2026 Receiving objects: 100% (2901/2901), 30.18 MiB | 4.42 MiB/s, done. Resolving deltas: 100% (1599/1599), done. ⏩ Performing system checks βœ… docker is properly installed βœ… git is properly installed βœ… Docker is properly executable ⏩ Setup your environment in an .env file βœ… nextcloud.local (127.0.0.1) already exists βœ… nextcloud.local (::1) already exists βœ… nextcloud2.local (127.0.0.1) already exists βœ… nextcloud2.local (::1) already exists βœ… nextcloud3.local (127.0.0.1) already exists βœ… nextcloud3.local (::1) already exists βœ… stable16.local (127.0.0.1) already exists βœ… stable16.local (::1) already exists βœ… stable17.local (127.0.0.1) already exists βœ… stable17.local (::1) already exists βœ… stable18.local (127.0.0.1) already exists βœ… stable18.local (::1) already exists βœ… stable19.local (127.0.0.1) already exists βœ… stable19.local (::1) already exists βœ… stable20.local (127.0.0.1) already exists βœ… stable20.local (::1) already exists βœ… stable21.local (127.0.0.1) already exists βœ… stable21.local (::1) already exists βœ… stable22.local (127.0.0.1) already exists βœ… stable22.local (::1) already exists βœ… stable23.local (127.0.0.1) already exists βœ… stable23.local (::1) already exists βœ… stable24.local (127.0.0.1) already exists βœ… stable24.local (::1) already exists βœ… stable25.local (127.0.0.1) already exists βœ… stable25.local (::1) already exists βœ… stable26.local (127.0.0.1) already exists βœ… stable26.local (::1) already exists βœ… stable27.local (127.0.0.1) already exists βœ… stable27.local (::1) already exists βœ… stable28.local (127.0.0.1) already exists βœ… stable28.local (::1) already exists βœ… mail.local (127.0.0.1) already exists βœ… mail.local (::1) already exists βœ… collabora.local (127.0.0.1) already exists βœ… collabora.local (::1) already exists βœ… codedev.local (127.0.0.1) already exists βœ… codedev.local (::1) already exists βœ… onlyoffice.local (127.0.0.1) already exists βœ… onlyoffice.local (::1) already exists βœ… proxy.local (127.0.0.1) already exists βœ… proxy.local (::1) already exists βœ… hpb.local (127.0.0.1) already exists βœ… hpb.local (::1) already exists βœ… push.local (127.0.0.1) already exists βœ… push.local (::1) already exists βœ… keycloak.local (127.0.0.1) already exists βœ… keycloak.local (::1) already exists βœ… portal.local (127.0.0.1) already exists βœ… portal.local (::1) already exists βœ… gs1.local (127.0.0.1) already exists βœ… gs1.local (::1) already exists βœ… gs2.local (127.0.0.1) already exists βœ… gs2.local (::1) already exists βœ… lookup.local (127.0.0.1) already exists βœ… lookup.local (::1) already exists βœ… elasticsearch.local (127.0.0.1) already exists βœ… elasticsearch.local (::1) already exists βœ… elasticsearch-ui.local (127.0.0.1) already exists βœ… elasticsearch-ui.local (::1) already exists βœ… pgadmin.local (127.0.0.1) already exists βœ… pgadmin.local (::1) already exists βœ… phpmyadmin.local (127.0.0.1) already exists βœ… phpmyadmin.local (::1) already exists βœ… talk-signaling.local (127.0.0.1) already exists βœ… talk-signaling.local (::1) already exists βœ… talk-recording.local (127.0.0.1) already exists βœ… talk-recording.local (::1) already exists Setting custom containers for arm platform ⏩ Setting up folder structure and fetching repositories 🌏 Fetching server (this might take a while to finish) Cloning into 'workspace/server'... remote: Enumerating objects: 11762, done. remote: Counting objects: 100% (11762/11762), done. remote: Compressing objects: 100% (9385/9385), done. remote: Total 11762 (delta 3146), reused 5900 (delta 2017), pack-reused 0 Receiving objects: 100% (11762/11762), 60.23 MiB | 15.97 MiB/s, done. Resolving deltas: 100% (3146/3146), done. Updating files: 100% (10863/10863), done. Submodule '3rdparty' (https://github.com/nextcloud/3rdparty.git) registered for path '3rdparty' Cloning into '/Users/leanderSchulten/git_projekte/nextcloud-docker-dev/workspace/server/3rdparty'... remote: Enumerating objects: 52661, done. remote: Counting objects: 100% (4367/4367), done. remote: Compressing objects: 100% (2121/2121), done. remote: Total 52661 (delta 2406), reused 3969 (delta 2178), pack-reused 48294 Receiving objects: 100% (52661/52661), 70.62 MiB | 26.51 MiB/s, done. Resolving deltas: 100% (28294/28294), done. Submodule path '3rdparty': checked out 'be6be0e0c5803c083e0684bb4e3c6ec6352da9fa' ./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable 🌏 Fetching viewer ❌ Failed to install viewer ./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable 🌏 Fetching recommendations ❌ Failed to install recommendations ./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable 🌏 Fetching files_pdfviewer ❌ Failed to install files_pdfviewer ./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable 🌏 Fetching profiler ❌ Failed to install profiler ./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable 🌏 Fetching hmr_enabler ❌ Failed to install hmr_enabler ./bootstrap.sh: line 158: APPS_CLONE_PARAMS[@]: unbound variable 🌏 Fetching circles ❌ Failed to install circles ╔═════════════════════════════════════════╗ β•‘ oOo Ready to start developing πŸŽ‰ β•‘ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• πŸš€ Start the Nextcloud server by running $ docker compose up -d nextcloud πŸ’€ Stop it with $ docker compose stop nextcloud πŸ—‘ Fresh install and wipe all data $ docker compose down -v Note that for performance reasons the server repository has been cloned with --depth=1. To get the full history it is highly recommended to run: $ cd workspace/server $ git fetch --unshallow $ git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" $ git fetch origin This may take some time depending on your internet connection speed. You might as well use the script in scripts/download-full-history.sh. For more details about the individual setup options see the README.md file or checkout the repo at https://github.com/juliushaertl/nextcloud-docker-dev ```

juliusknorr commented 8 months ago

Can you tell which shell your using?

autoantwort commented 8 months ago

I am using zsh, but I get the same error when I use a bash shell.

bash-3.2$ bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin23)
Copyright (C) 2007 Free Software Foundation, Inc.
autoantwort commented 8 months ago

Ok minimal script is:

#!/bin/bash
set -o nounset
test=()
echo "$test"

fails with test.sh: line 4: test: unbound variable

autoantwort commented 8 months ago

Ah I have found http://mywiki.wooledge.org/BashFAQ/112

An empty array becomes an error (in bash 4.3, but not in bash 4.4, where there is no error even without assignment array=()):