小编THe*_*ess的帖子

是否可以使用 Ansible 在没有“command:”或“shell:”的情况下执行“git submodule update”?

所以我被赋予了通过 Ansible 更新某个目录的任务,但我似乎找不到一种方法来git submodule update执行git:.

git submodule update不使用command:or真的没有其他方法吗shell:

我当前的代码:

# Command to execute: git remote update
- name: Git Update
  git:
    repo: "{{ git_ssh_key }}"
    dest:  ~/some/directory
    update: yes
    version: master

# Command to execute: git reset --hard origin/master
- name: Git reset
  command: git reset --hard origin/master
  args: 
    chdir: ~/some/directory

# Command to execute: git submodule update
- name: Git Submodule Update
  [Here is where I need your help to …
Run Code Online (Sandbox Code Playgroud)

git git-submodules ansible

6
推荐指数
1
解决办法
4060
查看次数

收到错误:chromedriver 安装失败错误 eacces 权限被拒绝 mkdir

当我尝试使用npm install chromedriver --chromedriver-force-downloadNode js 安装 Chrome 驱动程序时,出现以下错误:chromedriver installation failed error eacces permission denied mkdir

我已经申请了完全许可777,但仍然收到此错误,有人可以帮助我为什么会收到此错误吗?

我使用了这些命令:

1) npm i chromedriver

2) Force Download : npm install chromedriver --chromedriver-force-download
Run Code Online (Sandbox Code Playgroud)

mocha.js node.js selenium-chromedriver node-modules selenium-webdriver

4
推荐指数
1
解决办法
4816
查看次数

angular *ngFor 不使用输入重新渲染 html 表

我遇到了一个非常奇怪的角度问题。我在我的 ts 文件中创建了一个简单的数组,我通过迭代同一个数组来显示一个带有输入的表。现在,当我更改数组(反转它)时,它工作正常,但是如果我在更改之前在输入中输入了某些内容,则文本将保留在输入中。

这是代码

component.ts

    import { Component } from '@angular/core';

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent {
      title = 'practice';
      myArray = [1,2,3,4,5,6,7];
      change() {
        // this.myArray = [];
        this.myArray.reverse();

      }
    }
Run Code Online (Sandbox Code Playgroud)

我的 HTML:

    import { Component } from '@angular/core';

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent {
      title = 'practice';
      myArray = [1,2,3,4,5,6,7];
      change() {
        // this.myArray = [];
        this.myArray.reverse();

      }
    }
Run Code Online (Sandbox Code Playgroud)

问题说明示例视频:https : //www.loom.com/share/6f4887183bb94150ad7390f25e5b466a

如您所见,当我在输入中输入内容并更改数组时,该值仍保留在数组中。我已经检查过原始数组没有改变。

我的意思是它只是被逆转了,但没有别的。

问题是什么?

javascript angular

3
推荐指数
1
解决办法
1476
查看次数