)]}'
{
  "commit": "4f8888ed92fb068545e2f7a819c094524bfa5dbd",
  "tree": "5e6ae93084300351fee49d04f520fa095e659069",
  "parents": [
    "bba751ff84a83aee06a20553e9322893c3377b80"
  ],
  "author": {
    "name": "Julian Mateu",
    "email": "julian.mateu@globality.com",
    "time": "Tue Mar 07 12:34:25 2023 +0000"
  },
  "committer": {
    "name": "Julian Mateu",
    "email": "julian.mateu@globality.com",
    "time": "Fri Mar 17 09:41:43 2023 +0000"
  },
  "message": "Fix assert_symlink_to for temp files in OSX\n\nThe `assert_symlink_to` function uses `_bats_file_readlinkf_macos` for OSX, which prepends the physical directory to the target file, but the assertion in `assert_symlink_to` compares the resolved link to the provided `sourcefile`, which does not have this physical directory, so the assertion will fail in some cases where these two differ, e.g. in a temp directory:\n```bash\nrealsource\u003d/private/var/folders/mm/241yd_bn0b5095s4tgq_r84c0000gq/T/65-assert-10-assert_symlink_to.bats-3-8MdiJY/file\nsourcefile\u003d/var/folders/mm/241yd_bn0b5095s4tgq_r84c0000gq/T/65-assert-10-assert_symlink_to.bats-3-8MdiJY/file\n```\n\nThis commit fixes the issue by defining a `realexpectedsource` variable which results from calling `_bats_file_readlinkf_macos` with the `sourcefile`, and makes that comparison instead, so that `realsource` matches the `realexpectedsource` for paths with a physical directory:\n```bash\nrealexpectedsource\u003d/private/var/folders/mm/241yd_bn0b5095s4tgq_r84c0000gq/T/65-assert-10-assert_symlink_to.bats-3-8MdiJY/file\n```\n\nThis was tested by adding a new unit test in the\n`65-assert-10-assert_symlink_to.bats` file, which fails with the previous logic and passes with the fix.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6bea4da08fa2e923b45e3b3dc3b2cb0116bcab3d",
      "old_mode": 33188,
      "old_path": "src/file.bash",
      "new_id": "fe828988e13f2e3c373e6bbc0f69e03a501c91ca",
      "new_mode": 33188,
      "new_path": "src/file.bash"
    },
    {
      "type": "modify",
      "old_id": "592a8e882e6aa33c63ebf4fd8402f50c492220a2",
      "old_mode": 33188,
      "old_path": "test/65-assert-10-assert_symlink_to.bats",
      "new_id": "e079d1729a3b3a79a0a1d41697b87dbf4d603d36",
      "new_mode": 33188,
      "new_path": "test/65-assert-10-assert_symlink_to.bats"
    }
  ]
}
