- awk -i inplace '/location \/projects\/'"$location"'/,/}/ {if(/proxy_pass/) sub(/:[0-9]+.;/,":'"$port"';")} {print}' "$file"
+ awk -i inplace '/location \/projects\/'"$location"'/,/}/ {if(/proxy_pass/) sub(/:[0-9]+.;/,":'"$port"';")} {print}' $(ls $file)
./replace_location_port.sh -n who-am-i -v v2.50.6 -p 222 -f etc/nginx/locations/\*.locations
catch
здесь тоже нужно учесть, т.к. он возвращает Promise<any>
, соответственно тебе нужно использовать примерно такую конструкцию:const getData = async (url: string): Promise<Res | any> => await fetch(url).then((data: Response): Promise<Res> => data.json()).catch(err => err.message);
modal: boolean = false
showmodal() {
this.modal = !this.modal
}
<button (click)="product.showmodal()" class="btn btn-primary">Детальная информация</button>
app-product
показывай или не показывай модалку в зависимости от modal
git init
git branch -m main
git init && git add . && git commit -m "init"
git checkout -b dev
git remote add origin https://<access-token-name>:<access-token>@<твой url>/<твой юзер>/<твой репо>.git
git push origin +head
- +head это текущая ветка, можно dev указать.