diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2020-06-23 00:22:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 00:22:29 -0400 |
commit | fa17600efcd09bf74954e728047fded3ff0bd0cd (patch) | |
tree | 33a5a5a608aaba2752ee3f2188370d315b15864a /src/spm.c | |
parent | 62db2a4054a55883e7476750c925cb9d5a72fbc5 (diff) | |
parent | 155b25db75ecad4b19fd9a36b1aad64d436925dc (diff) | |
download | spmc-fa17600efcd09bf74954e728047fded3ff0bd0cd.tar.gz |
Merge pull request #48 from jhunkeler/no-auto-repo_target
Move SPM_GLOBAL.repo_target string usage out of mirror_clone
Diffstat (limited to 'src/spm.c')
-rw-r--r-- | src/spm.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -94,12 +94,14 @@ int main(int argc, char *argv[], char *arge[]) { override_manifests = 1; } else if (strcmp(arg, "-m") == 0 || strcmp(arg, "--manifest") == 0) { + char *target; if (arg_next == NULL) { fprintf(stderr, "-m|--manifest requires a directory path\n"); usage(); exit(1); } - manifestlist_append(mf, arg_next); + target = join((char *[]) {arg_next, SPM_GLOBAL.repo_target, NULL}, DIRSEPS); + manifestlist_append(mf, target); i++; } else if (strcmp(arg, "--reindex") == 0) { @@ -215,8 +217,12 @@ int main(int argc, char *argv[], char *arge[]) { // Apply some default manifest locations; unless the user passes -M|--override-manifests if (override_manifests == 0) { + char *target; // Remote package manifests have priority over the local package store - manifestlist_append(mf, "https://astroconda.org/spm"); + target = join((char *[]) {"https://astroconda.org/spm", SPM_GLOBAL.repo_target, NULL}, DIRSEPS); + manifestlist_append(mf, target); + free(target); + // Add the local package store to the bottom manifestlist_append(mf, SPM_GLOBAL.package_dir); } |