summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-01-13 09:31:27 +0200
committerTimo Teras <timo.teras@iki.fi>2009-01-13 09:31:27 +0200
commitd16b42438599675da2e86201235bdaf4d3f59cca (patch)
treeaf19f087a33232fa743dbb8aa964c3b9a302e6c7 /src/apk.c
parentb8940df6b9b9f4aa644cb1dfa91732b451d43ffd (diff)
downloadapk-tools-d16b42438599675da2e86201235bdaf4d3f59cca.tar.gz
apk-tools-d16b42438599675da2e86201235bdaf4d3f59cca.tar.bz2
apk-tools-d16b42438599675da2e86201235bdaf4d3f59cca.tar.xz
apk-tools-d16b42438599675da2e86201235bdaf4d3f59cca.zip
apk: honour --root command line switch
Was broken by earlier ROOT environment commit.
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/apk.c b/src/apk.c
index 626c4ee..e874cbb 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -115,7 +115,8 @@ int main(int argc, char **argv)
argc -= optind;
argv += optind;
- apk_root = getenv("ROOT");
+ if (apk_root == NULL)
+ apk_root = getenv("ROOT");
if (apk_root == NULL)
apk_root = "/";