Skip to content

Commit ed074b5

Browse files
authored
fix: set through env to avoid interpretation as command (#329)
When I took the changes to the Ubuntu setup script and propagated them to other scripts that run in slightly different contexts, the script failed at line 45 as DEBIAN_FRONTEND=noninteractive was interpreted as a command rather than a variable assignment. Added the env command so there's no misinterpretation. Tested in docker as both root and user.
1 parent fcaed15 commit ed074b5

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.5.2-dev0
1+
## 0.5.2-dev1
22

33
### Enhancements
44

@@ -9,6 +9,8 @@ rather than a "tmp-ingest-" dir in the working directory.
99

1010
### Fixes
1111

12+
* 'setup_ubuntu.sh` no longer fails in some contexts by interpreting
13+
`DEBIAN_FRONTEND=noninteractive` as a command
1214
* `unstructured-ingest` no longer re-downloads files when --preserve-downloads
1315
is used without --download-dir.
1416

scripts/setup_ubuntu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fi
3232
$sudo $pac update -y
3333
if [[ -d /etc/needrestart/conf.d ]]; then
3434
# shellcheck disable=SC2016
35-
echo '$nrconf{restart} = '"'a';" | $sudo tee /etc/needrestart/conf.d/99z_temp_disable.conf
35+
echo '$nrconf{restart} = '"'a';" | $sudo tee /etc/needrestart/conf.d/99z_temp_disable.conf
3636
fi
3737
$sudo $pac upgrade -y
3838

@@ -42,7 +42,7 @@ $sudo $pac install -y git
4242

4343
#### Python
4444
# Install tools needed to build python
45-
$sudo DEBIAN_FRONTEND=noninteractive $pac install -y curl gcc bzip2 sqlite zlib1g-dev libreadline-dev libsqlite3-dev libssl-dev tk-dev libffi-dev xz-utils make build-essential libbz2-dev wget llvm libncursesw5-dev libxml2-dev libxmlsec1-dev liblzma-dev
45+
$sudo env DEBIAN_FRONTEND="noninteractive" $pac install -y curl gcc bzip2 sqlite zlib1g-dev libreadline-dev libsqlite3-dev libssl-dev tk-dev libffi-dev xz-utils make build-essential libbz2-dev wget llvm libncursesw5-dev libxml2-dev libxmlsec1-dev liblzma-dev
4646
# Install pyenv
4747
if [[ ! -d $USER_ACCOUNT_HOME/.pyenv ]]; then
4848
sudo -u "$USER_ACCOUNT" -i <<'EOF'

unstructured/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.5.2-dev0" # pragma: no cover
1+
__version__ = "0.5.2-dev1" # pragma: no cover

0 commit comments

Comments
 (0)