Skip to content

Commit

Permalink
fix: add --ignore-conflicts for sf project deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmorris180 committed Feb 17, 2024
1 parent 558ded4 commit 8e3ee9c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ require("salesforce").setup({
borderchars = { "", "", "", "", "", "", "", "" },
},
file_manager = {
ignore_conflicts = false,
ignore_conflicts = false, -- ignores conflicts on "sf project retrieve/deploy"
},
org_manager = {
default_org_indicator = "󰄬",
Expand Down
2 changes: 1 addition & 1 deletion doc/salesforce.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can pass in a lua table of options to customize the plugin. The default opti
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
},
file_manager = {
ignore_conflicts = false,
ignore_conflicts = false, -- ignores conflicts on "sf project retrieve/deploy"
},
org_manager = {
default_org_indicator = "󰄬",
Expand Down
4 changes: 4 additions & 0 deletions lua/salesforce/file_manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ M.push_to_org = function()
Util.clear_and_notify(string.format("Pushing %s to org %s...", file_name, default_username))
local command =
string.format("%s project deploy start --json -o %s", executable, default_username)
if Config:get_options().file_manager.ignore_conflicts then
Debug:log("file_manager.lua", "Ignoring conflicts becuase of config option")
command = command .. " --ignore-conflicts"
end
Debug:log("file_manager.lua", "Command: " .. command .. string.format(" -d '%s'", path))
push(command, path)
end
Expand Down
2 changes: 1 addition & 1 deletion lua/salesforce/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
--- borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
--- },
--- file_manager = {
--- ignore_conflicts = false,
--- ignore_conflicts = false, -- ignores conflicts on "sf project retrieve/deploy"
--- },
--- org_manager = {
--- default_org_indicator = "󰄬",
Expand Down

0 comments on commit 8e3ee9c

Please sign in to comment.