Revert "expand paths more smartly (#2599)" (#2615)

This reverts commit f52ea4061d.
This commit is contained in:
James Trew
2023-07-21 21:50:44 -04:00
committed by GitHub
parent f52ea4061d
commit 7bb2fcecdc
8 changed files with 24 additions and 30 deletions

View File

@@ -5,7 +5,6 @@ local log = require "plenary.log"
local async = require "plenary.async"
local channel = require("plenary.async").control.channel
local utils = require "telescope.utils"
local M = {}
@@ -22,7 +21,7 @@ function AsyncJob.new(opts)
self.stderr = opts.stderr or M.NullPipe()
if opts.cwd and opts.cwd ~= "" then
self.uv_opts.cwd = utils.smart_path_expand(opts.cwd)
self.uv_opts.cwd = vim.fn.expand(vim.fn.escape(opts.cwd, "$"))
-- this is a "illegal" hack for windows. E.g. If the git command returns `/` rather than `\` as delimiter,
-- vim.fn.expand might just end up returning an empty string. Weird
-- Because empty string is not allowed in libuv the job will not spawn. Solution is we just set it to opts.cwd