Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path.extname is deprecated. #115

Open
sonuterrific opened this issue Dec 8, 2016 · 50 comments · May be fixed by #1067
Open

path.extname is deprecated. #115

sonuterrific opened this issue Dec 8, 2016 · 50 comments · May be fixed by #1067

Comments

@sonuterrific
Copy link

Argument to path.extname must be a string

path.extname (/usr/share/atom/resources/app.asar/src/electron-shims.js:20:10)
ATPOutputView.getCwd (/home/sudhanshu/.atom/packages/atom-terminal-panel/lib/atp-view.coffee:1874:17)
BuiltinVariables.parseFull (/home/sudhanshu/.atom/packages/atom-terminal-panel/lib/atp-builtins-variables.coffee:188:77)
BuiltinVariables.parseHtml (/home/sudhanshu/.atom/packages/atom-terminal-panel/lib/atp-builtins-variables.coffee:111:16)
ATPOutputView.parseTemplate (/home/sudhanshu/.atom/packages/atom-terminal-panel/lib/atp-view.coffee:664:36)
ATPPanel.updateStatusBar (/home/sudhanshu/.atom/packages/atom-terminal-panel/lib/atp-panel.coffee:190:50)
@beamaster
Copy link

atom-terminal-panel(1 deprecation)
i have the same deprecation

@DeRaNGeR
Copy link

same problem

1 similar comment
@miladyalda
Copy link

same problem

@yulis
Copy link

yulis commented Jan 25, 2017

same here

@flatwound
Copy link

+1

@dichioniccolo
Copy link

same

@luolisave
Copy link

same here.

@AuggieMBP
Copy link

I have the same problem here... 😢

@AuggieMBP
Copy link

AuggieMBP commented Feb 2, 2017

So I was able to temporarily fix this issue... it could also just be a workaround so please follow this at your own risk. It did however remove the "deprecation" message from atom for me.

On the deprecated call, click on the second path:
ATPOutputView.getCwd (/home/sudhanshu/.atom/packages/atom-terminal-panel/lib/atp-view.coffee:1874:17)

In the atp-view.coffee file, for the getCwd method, you will want to make the following edits to the extFile and projectDir variables:
extFile = extname atom.project.getPaths()[0] if typeof atom.project.getPaths()[0] is 'string'
projectDir = dirname atom.project.getPaths()[0] if typeof atom.project.getPaths()[0] is 'string'

these are lines 1318 and 1331 respectively.

getCwd` should look like this:
  `getCwd: ->
    if not atom.project?
      return null
    extFile = extname atom.project.getPaths()[0] if typeof atom.project.getPaths()[0] is 'string'

    if extFile == ""
      if atom.project.path
        projectDir = atom.project.path
      else
        if process.env.HOME
          projectDir = process.env.HOME
        else if process.env.USERPROFILE
          projectDir = process.env.USERPROFILE
        else
          projectDir = '/'
    else
      projectDir = dirname atom.project.getPaths()[0] if typeof atom.project.getPaths()[0] is 'string'

    cwd = @cwd or projectDir or @userHome
    return @correctFilePath cwd

I hope this helps. I was glad I no longer saw the deprecation message 😆

@ShiningTrapez
Copy link

Created a Pull Request for this (#118) based on @AuggieMBP's comment

@arsari
Copy link

arsari commented Feb 21, 2017

Same problem... When an updated to the package will be released? I like much this package but don't like to have deprecation alert in my atom :(

@sherlockkk
Copy link

same problem

@phinias12
Copy link

same issue

8 similar comments
@prakasa1904
Copy link

same issue

@Quwater
Copy link

Quwater commented Mar 16, 2017

same issue

@karayel
Copy link

karayel commented Mar 29, 2017

same issue

@jtshaver
Copy link

jtshaver commented Apr 5, 2017

same issue

@ysicing
Copy link

ysicing commented Apr 6, 2017

same issue

@pakdel
Copy link

pakdel commented Apr 6, 2017

same issue

@fbrillon
Copy link

fbrillon commented Apr 6, 2017

same issue

@radwasherif
Copy link

same issue

@tonskey
Copy link

tonskey commented Apr 12, 2017

Solution from @AuggieMBP solve problem

@yanxiaobo
Copy link

same issue

@Encr1pt3d
Copy link

I have an issue the charset codification of the console, look this text:
"El n�mero de serie del volumen es: ECA4-13CE"
How can i upgrade this charset tu UTF-8?

Thanks!

@tmcarr
Copy link

tmcarr commented Apr 27, 2017

Yup, same here....

@nixbytes
Copy link

nixbytes commented May 5, 2017

FYI here is a Deprecated calls I am getting

Argument to path.extname must be a string
Report Issue
path.extname - /Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:20:10
ATPOutputView.getCwd - /Users/stigadmin/.atom/packages/atom-terminal-panel/lib/atp-view.coffee:1874:17
BuiltinVariables.parseFull - /Users/stigadmin/.atom/packages/atom-terminal-panel/lib/atp-builtins-variables.coffee:188:77
BuiltinVariables.parseHtml - /Users/stigadmin/.atom/packages/atom-terminal-panel/lib/atp-builtins-variables.coffee:111:16
ATPOutputView.parseTemplate - /Users/stigadmin/.atom/packages/atom-terminal-panel/lib/atp-view.coffee:664:36
ATPPanel.updateStatusBar - /Users/stigadmin/.atom/packages/atom-terminal-panel/lib/atp-panel.coffee:190:50

@ghost
Copy link

ghost commented May 10, 2017

+1

3 similar comments
@not-me-svg
Copy link

+1

@eafomi4ev
Copy link

+1

@alugarius
Copy link

+1

@codeymac888
Copy link

@AuggieMBP Thanks man

@ahalcyon
Copy link

+1

@prakasa1904
Copy link

o.O3 ---> any update ?

@simonzsolt
Copy link

+1

@ghost
Copy link

ghost commented Jun 27, 2018

I have the same issue

@Xinatorus
Copy link

Still not fixed?

@ishuacharis
Copy link

still not fixed

@ghost ghost deleted a comment Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.