File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 - [ 3-versioning] ( ./adrs/3-versioning.md )
1212 - [ 4-experimental-flag] ( ./adrs/4-experimental-flag.md )
1313 - [ 5-usage-of-feature-flags] ( ./adrs/5-usage-of-feature-flags.md )
14- - [ 6-render-command-supporting-stdin-pipe] ( ./adrs/6-render-command-supporting-stdin-pipe.md )
1514 - [ 7-usage-of-shell-scripts-instead-of-makefiles] ( ./adrs/7-usage-of-shell-scripts-instead-of-makefiles.md )
1615- [ RFCs] ( ./rfcs/root.md )
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1- use std:: io:: { stdin , Read , Result } ;
1+ use std:: io:: Result ;
22
33pub struct CallArgs {
44 pub privileges : Privilege ,
@@ -142,23 +142,7 @@ impl ClapArgumentLoader {
142142 Some ( x) => {
143143 let config = if x. is_present ( "config" ) {
144144 let config_param = x. value_of ( "config" ) . unwrap ( ) ;
145- if config_param == "-" {
146- match privileges {
147- Privilege :: Normal => {
148- return Err ( std:: io:: Error :: new (
149- std:: io:: ErrorKind :: Other ,
150- "can not use pipe argument without experimental features being activated" ,
151- ) ) ;
152- }
153- Privilege :: Experimental => { }
154- }
155- let mut buffer = String :: new ( ) ;
156- let stdin = stdin ( ) ;
157- stdin. lock ( ) . read_to_string ( & mut buffer) ?;
158- buffer
159- } else {
160- std:: fs:: read_to_string ( config_param. to_owned ( ) ) ?
161- }
145+ std:: fs:: read_to_string ( config_param. to_owned ( ) ) ?
162146 } else {
163147 return Err ( std:: io:: Error :: new (
164148 std:: io:: ErrorKind :: Other ,
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
33ev () {
44 if [ $2 -eq $1 ]
@@ -13,12 +13,14 @@ echo "Testing with no shell trust"
1313cmd=" ../target/debug/complate -e render -c=./config.yml -t=test"
1414$cmd
1515ev 1 $?
16+ echo " success"
1617
1718echo " Testing with ultimate shell-trust"
1819cmd=" ../target/debug/complate -e render -c=./config.yml -t=test --shell-trust=ultimate"
1920$cmd
2021ev 0 $?
21- echo " "
22+ echo
23+ echo " success"
2224
2325echo " "
2426echo " All tests succeeded."
You can’t perform that action at this time.
0 commit comments