【问题标题】:git command not returning any value in makefilegit命令不返回makefile中的任何值
【发布时间】:2023-01-05 17:36:41
【问题描述】:

我有一个应该打印 git log 的简单 makefile,如下所示。

SHELL=/bin/bash

 get_log:
  echo $(git log)

但是,当我运行 make get_log 时,没有返回任何内容,尽管如果我直接在 CMD 中运行 git log,我会得到结果。 你知道这里可能是什么问题吗?提前致谢。

【问题讨论】:

    标签: linux bash git shell makefile


    【解决方案1】:

    根据您必须使用的设计,错误出在您的 makefile 格式上标签缩进所以你必须在echo $(git log)之前加上tab indentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-15
      • 2021-06-10
      • 1970-01-01
      • 2013-08-27
      • 2021-03-12
      • 2014-04-27
      相关资源
      最近更新 更多