diff --git a/.github/workflows/build-macosx-aarch64.yml b/.github/workflows/build-macosx-aarch64.yml
index 6cdb8f0b9..d629697db 100644
--- a/.github/workflows/build-macosx-aarch64.yml
+++ b/.github/workflows/build-macosx-aarch64.yml
@@ -39,7 +39,7 @@ jobs:
           printenv
       - name: "[HACK]: Set default compiler flags for MacOS systems"
         run: |
-          luarocks config --scope=system -- LIBFLAG "-std=c++11 -shared"
+          luarocks config --scope=system -- variables.LIBFLAG "-std=c++11 -shared"
       - name: Install `LuaFileSystem` Package
         run: |
           luarocks --verbose --local --lua-version=5.1 install luafilesystem
diff --git a/.github/workflows/build-macosx-x86_64.yml b/.github/workflows/build-macosx-x86_64.yml
index 7878a9b31..e39024e4b 100644
--- a/.github/workflows/build-macosx-x86_64.yml
+++ b/.github/workflows/build-macosx-x86_64.yml
@@ -39,7 +39,7 @@ jobs:
           printenv
       - name: "[HACK]: Set default compiler flags for MacOS systems"
         run: |
-          luarocks config --scope=system -- LIBFLAG "-std=c++11 -shared"
+          luarocks config --scope=system -- variables.LIBFLAG "-std=c++11 -shared"
       - name: Install `LuaFileSystem` Package
         run: |
           luarocks --verbose --local --lua-version=5.1 install luafilesystem