aboutsummaryrefslogtreecommitdiff
path: root/src/spm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spm.c')
-rw-r--r--src/spm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/spm.c b/src/spm.c
index e456e90..d9e463b 100644
--- a/src/spm.c
+++ b/src/spm.c
@@ -219,13 +219,6 @@ int main(int argc, char *argv[], char *arge[]) {
exit(1);
}
- // If the package has dependencies listed, append them to `deps` now
- if (package->requirements_records) {
- for (size_t p = 0; p < package->requirements_records; p++) {
- dep_append(&deps, package->requirements[p]);
- }
- }
-
// Process any additional dependencies the package requires
char root[PATH_MAX];
memset(root, '\0', PATH_MAX);
@@ -233,6 +226,13 @@ int main(int argc, char *argv[], char *arge[]) {
strncat(root, DIRSEPS, PATH_MAX - 1);
strncat(root, SPM_GLOBAL.repo_target, PATH_MAX - 1);
+ // If the package has dependencies listed, append them to `deps` now
+ if (package->requirements_records) {
+ for (size_t p = 0; p < package->requirements_records; p++) {
+ dep_append(&deps, root, package->requirements[p]);
+ }
+ }
+
if (dep_all(&deps, root, package->archive) < 0) {
dep_free(&deps);
free_global_config();