foundweekends / foundweekends/conscript

Make dry run configurable using launchconfig

Đang mở
#35 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Enhancement
Ngôn ngữ chính
Scala
Star
477
Fork
59
Merge trung bình
1 giờ 2 phút
Pull request đã merge (30 ngày)
7

Mô tả

migrating from #34
## steps
1. `cs foo` where calling `foo --version` does something undesirable (like waiting for user input forever).
## problem

the installation process calls `foo --version` and does that thing.
## expectations

I would like to propose 2-tier solution to this using `launchconfig` file. Both of them involve adding an _optional_ section `conscript` to `launchconfig` as follows:

```
[conscript]
dry-run: false
dry-run-param: --something-not-version
```
### opt-out

The proposal is that we keep the existing behavior (run script with `--version`) by default, so existing happy conscript authors don't get sniped from the back. In other words, the new `[conscript]` section is totally optional.

If the conscript author just doesn't want to use dry-run option at all, they can opt-out by writing:

```
dry-run: false
```

Upon installation we don't do dry-run, and instead we print some warning saying that the jar's still not downloaded.
### `--help` instead of `--version`

Another scenario is that application does not support `--version`, but has some other harmless option already like `--help`.

```
dry-run-param: --something-not-version
```

This let's them customize to whatever. Again, if it's not specified `--version` is used.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.